Esempio n. 1
0
                    'user_agent': add_link_dictionary['user_agent'],
                    'header': add_link_dictionary['header'],
                    'out': add_link_dictionary['out']
                    }

    plugin_list.append(plugin_dict)

if len(plugin_list) != 0:
    # import PluginsDB
    from persepolis.scripts.data_base import PluginsDB
    
    # create an object for PluginsDB
    plugins_db = PluginsDB()

    # add plugin_list to plugins_table in plugins.db file.
    plugins_db.insertInPluginsTable(plugin_list)

    # Job is done! close connections.
    plugins_db.closeConnections()

    # notify that a link is added!
    plugin_ready = os.path.join(persepolis_tmp, 'persepolis-plugin-ready')
    osCommands.touch(plugin_ready)

    # start persepolis in system tray
    start_in_tray = True 



def main():
    # if lock_file is existed , it means persepolis is still running!
Esempio n. 2
0
        'user_agent': add_link_dictionary['user_agent'],
        'header': add_link_dictionary['header'],
        'out': add_link_dictionary['out']
    }

    plugin_list.append(plugin_dict)

if len(plugin_list) != 0:
    # import PluginsDB
    from persepolis.scripts.data_base import PluginsDB

    # create an object for PluginsDB
    plugins_db = PluginsDB()

    # add plugin_list to plugins_table in plugins.db file.
    plugins_db.insertInPluginsTable(plugin_list)

    # Job is done! close connections.
    plugins_db.closeConnections()

    # notify that a link is added!
    plugin_ready = os.path.join(persepolis_tmp, 'persepolis-plugin-ready')
    osCommands.touch(plugin_ready)

    # start persepolis in system tray
    start_in_tray = True


def main():
    # if lock_file is existed , it means persepolis is still running!
    if lock_file_validation:
Esempio n. 3
0
    # add add_link_dictionary to plugins_db.
    from persepolis.scripts.data_base import PluginsDB
    
    # create an object for PluginsDB
    plugins_db = PluginsDB()

    # add new link information to plugins_table in plugins.db file.
    plugin_dict ={'link': add_link_dictionary['link'],
                    'referer': add_link_dictionary['referer'],
                    'load_cookies': add_link_dictionary['load-cookies'],
                    'user_agent': add_link_dictionary['user-agent'],
                    'header': add_link_dictionary['header'],
                    'out': add_link_dictionary['out']
                    }
    plugins_db.insertInPluginsTable(plugin_dict)

    # Job is done! close connections.
    plugins_db.closeConnections()

    # notify that a link is added!
    plugin_ready = os.path.join(persepolis_tmp, 'persepolis-plugin-ready')
    osCommands.touch(plugin_ready)


if args.tray:
    start_in_tray = 'yes'
else:
    start_in_tray = 'no'