# Path: persepolis/scripts/useful_tools.py
# def determineConfigFolder():
#     if os_type in OS.UNIX_LIKE:
#         config_folder = os.path.join(
#             home_address, ".config/persepolis_download_manager")
#     elif os_type == OS.OSX:
#         config_folder = os.path.join(
#             home_address, "Library/Application Support/persepolis_download_manager")
#     elif os_type == OS.WINDOWS:
#         config_folder = os.path.join(
#             home_address, 'AppData', 'Local', 'persepolis_download_manager')
# 
#     return config_folder
# 
# Path: persepolis/scripts/osCommands.py
# def findFileManager():
# def touch(file_path):
# def xdgOpen(file_path, f_type='file', path='file'):
# def remove(file_path): 
# def removeDir(folder_path):
# def makeDirs(folder_path, hidden=False):
# def findMountPoint(path):
# def makeTempDownloadDir(path):
# def moveFile(old_file_path, new_path, new_path_type='folder'):
#         CREATE_NO_WINDOW = 0x08000000
#             CREATE_NO_WINDOW = 0x08000000
# 
# Path: persepolis/constants/Os.py
# class OS:
#     LINUX = 'Linux'
#     WINDOWS = 'Windows'
#     FREE_BSD = 'FreeBSD'
#     OPEN_BSD = 'OpenBSD'
#     OSX = DARWIN = 'Darwin'
#     BSD_FAMILY = [FREE_BSD, OPEN_BSD]
#     UNIX_LIKE = BSD_FAMILY + [LINUX]
#     LIST = [LINUX, WINDOWS, FREE_BSD, OPEN_BSD, OSX]
# 
# Path: persepolis/constants/Browser.py
# class BROWSER:
#     CHROME = 'chrome'
#     CHROMIUM = 'chromium'
#     OPERA = 'opera'
#     VIVALDI = 'vivaldi'
#     FIREFOX = 'firefox'
#     BRAVE = 'brave'
#     CHROME_FAMILY = [CHROME, CHROMIUM, VIVALDI, OPERA, BRAVE]
#     LIST = [CHROME, CHROMIUM, OPERA, VIVALDI, FIREFOX, BRAVE]


from persepolis.scripts.useful_tools import determineConfigFolder
from persepolis.scripts import osCommands
from persepolis.constants import OS, BROWSER
import subprocess
import platform
import sys
import os
        import winreg
            native_message_folder = home_address + \
                '/.config/google-chrome/NativeMessagingHosts'

        elif browser == BROWSER.FIREFOX:
            native_message_folder = home_address + \
                '/.mozilla/native-messaging-hosts'
        elif browser == BROWSER.VIVALDI:
            native_message_folder = home_address + \
                '/.config/vivaldi/NativeMessagingHosts'

        elif browser == BROWSER.OPERA:
            native_message_folder = home_address + \
                '/.config/opera/NativeMessagingHosts'

        elif browser == BROWSER.BRAVE:
            native_message_folder = home_address + \
                '/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts'


    # for Mac OSX
    elif os_type == OS.OSX:
        # find Persepolis execution path
        # persepolis execution path
        exec_path = os.path.join(config_folder, 'persepolis_run_shell')

        # Native Messaging Hosts folder path for every browser
        if browser == BROWSER.CHROMIUM:
            native_message_folder = home_address + \
                '/Library/Application Support/Chromium/NativeMessagingHosts'


# Path: persepolis/scripts/useful_tools.py
# def determineConfigFolder():
#     if os_type in OS.UNIX_LIKE:
#         config_folder = os.path.join(
#             home_address, ".config/persepolis_download_manager")
#     elif os_type == OS.OSX:
#         config_folder = os.path.join(
#             home_address, "Library/Application Support/persepolis_download_manager")
#     elif os_type == OS.WINDOWS:
#         config_folder = os.path.join(
#             home_address, 'AppData', 'Local', 'persepolis_download_manager')
# 
#     return config_folder
# 
# Path: persepolis/scripts/osCommands.py
# def findFileManager():
# def touch(file_path):
# def xdgOpen(file_path, f_type='file', path='file'):
# def remove(file_path): 
# def removeDir(folder_path):
# def makeDirs(folder_path, hidden=False):
# def findMountPoint(path):
# def makeTempDownloadDir(path):
# def moveFile(old_file_path, new_path, new_path_type='folder'):
#         CREATE_NO_WINDOW = 0x08000000
#             CREATE_NO_WINDOW = 0x08000000
# 
# Path: persepolis/constants/Os.py
# class OS:
#     LINUX = 'Linux'
#     WINDOWS = 'Windows'
#     FREE_BSD = 'FreeBSD'
#     OPEN_BSD = 'OpenBSD'
#     OSX = DARWIN = 'Darwin'
#     BSD_FAMILY = [FREE_BSD, OPEN_BSD]
#     UNIX_LIKE = BSD_FAMILY + [LINUX]
#     LIST = [LINUX, WINDOWS, FREE_BSD, OPEN_BSD, OSX]
# 
# Path: persepolis/constants/Browser.py
# class BROWSER:
#     CHROME = 'chrome'
#     CHROMIUM = 'chromium'
#     OPERA = 'opera'
#     VIVALDI = 'vivaldi'
#     FIREFOX = 'firefox'
#     BRAVE = 'brave'
#     CHROME_FAMILY = [CHROME, CHROMIUM, VIVALDI, OPERA, BRAVE]
#     LIST = [CHROME, CHROMIUM, OPERA, VIVALDI, FIREFOX, BRAVE]


# Path: persepolis/scripts/browser_integration.py
from persepolis.scripts.useful_tools import determineConfigFolder
from persepolis.scripts import osCommands
from persepolis.constants import OS, BROWSER
import subprocess
import platform
import sys
import os
        import winreg

            native_message_folder = home_address + \
                '/.config/google-chrome/NativeMessagingHosts'

        elif browser == BROWSER.FIREFOX:
            native_message_folder = home_address + \
                '/.mozilla/native-messaging-hosts'
        elif browser == BROWSER.VIVALDI:
            native_message_folder = home_address + \
                '/.config/vivaldi/NativeMessagingHosts'

        elif browser == BROWSER.OPERA:
            native_message_folder = home_address + \
                '/.config/opera/NativeMessagingHosts'

        elif browser == BROWSER.BRAVE:
            native_message_folder = home_address + \
                '/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts'


    # for Mac OSX
    elif os_type == OS.OSX:
        # find Persepolis execution path
        # persepolis execution path
        exec_path = os.path.join(config_folder, 'persepolis_run_shell')

        # Native Messaging Hosts folder path for every browser
        if browser == BROWSER.CHROMIUM:
            native_message_folder = home_address + \
                '/Library/Application Support/Chromium/NativeMessagingHosts'


        elif browser == BROWSER.CHROME: