File size: 1,156 Bytes
457b8fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import sys
import os

# Add the current directory to Python path so we can import our modules
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
    sys.path.insert(0, current_dir)

# When running as executable, modules might be in _MEIPASS
if hasattr(sys, '_MEIPASS'):
    meipass_dir = sys._MEIPASS
    if meipass_dir not in sys.path:
        sys.path.insert(0, meipass_dir)

# Now we can safely import our modules
try:
    from extract_glossary_from_epub import main as glossary_main
except ImportError as e:
    print(f"Failed to import glossary module: {e}")
    glossary_main = None

try:
    from TransateKRtoEN import main as translation_main
except ImportError as e:
    print(f"Failed to import translation module: {e}")
    translation_main = None

try:
    from epub_converter import fallback_compile_epub
except ImportError as e:
    print(f"Failed to import epub converter: {e}")
    fallback_compile_epub = None

try:
    from scan_html_folder import scan_html_folder
except ImportError as e:
    print(f"Failed to import scanner: {e}")
    scan_html_folder = None