# Path: modules/utils.py
# def get_executable_path():
#     if getattr(sys, 'frozen', False):
#         executable_path = os.path.abspath(os.path.dirname(sys.executable))
#     else:
#         executable_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# 
#     return executable_path
# 
# def make_dir(filename):
#     d = os.path.dirname(filename)
#     if not os.path.exists(d):
#         os.makedirs(d)
# 
# def copy_file(src, dest):
#     make_dir(dest)
#     shutil.copyfile(src, dest)


from importlib import import_module
from lxml import etree
from lxml.builder import E
from modules.utils import get_executable_path, make_dir, copy_file
import os, codecs

            elif e.tag == 'screenHeight':
                self.screen_height = int(e.text)

            elif e.tag == 'defaultProfile':
                self.default_profile = e.text

            elif e.tag == 'noMOBIoptimization':
                self.noMOBIoptimization = e.text.lower() == 'true'

            elif e.tag == 'sendToKindle':
                for s in e:
                    if s.tag == 'send':
                        self.send_to_kindle['send'] = s.text.lower() == 'true'

                    elif s.tag == 'deleteSendedBook':
                        self.send_to_kindle['deleteSendedBook'] = s.text.lower() == 'true'

                    elif s.tag == 'smtpServer':
                        self.send_to_kindle['smtpServer'] = s.text

                    elif s.tag == 'smtpPort':
                        self.send_to_kindle['smtpPort'] = int(s.text)

                    elif s.tag == 'smtpLogin':
                        self.send_to_kindle['smtpLogin'] = s.text

                    elif s.tag == 'smtpPassword':
                        self.send_to_kindle['smtpPassword'] = s.text


# Path: modules/utils.py
# def get_executable_path():
#     if getattr(sys, 'frozen', False):
#         executable_path = os.path.abspath(os.path.dirname(sys.executable))
#     else:
#         executable_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# 
#     return executable_path
# 
# def make_dir(filename):
#     d = os.path.dirname(filename)
#     if not os.path.exists(d):
#         os.makedirs(d)
# 
# def copy_file(src, dest):
#     make_dir(dest)
#     shutil.copyfile(src, dest)


# Path: modules/config.py
from importlib import import_module
from lxml import etree
from lxml.builder import E
from modules.utils import get_executable_path, make_dir, copy_file
import os, codecs


            elif e.tag == 'screenHeight':
                self.screen_height = int(e.text)

            elif e.tag == 'defaultProfile':
                self.default_profile = e.text

            elif e.tag == 'noMOBIoptimization':
                self.noMOBIoptimization = e.text.lower() == 'true'

            elif e.tag == 'sendToKindle':
                for s in e:
                    if s.tag == 'send':
                        self.send_to_kindle['send'] = s.text.lower() == 'true'

                    elif s.tag == 'deleteSendedBook':
                        self.send_to_kindle['deleteSendedBook'] = s.text.lower() == 'true'

                    elif s.tag == 'smtpServer':
                        self.send_to_kindle['smtpServer'] = s.text

                    elif s.tag == 'smtpPort':
                        self.send_to_kindle['smtpPort'] = int(s.text)

                    elif s.tag == 'smtpLogin':
                        self.send_to_kindle['smtpLogin'] = s.text

                    elif s.tag == 'smtpPassword':
                        self.send_to_kindle['smtpPassword'] = s.text


                    elif s.tag == 'fromUserEmail':