Ejemplo n.º 1
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR, 'data/interfaces/')
        http_look_list = [ name for name in os.listdir(http_look_dir) if os.path.isdir(os.path.join(http_look_dir, name)) ]

        config = {
                    "http_host":        lazylibrarian.HTTP_HOST,
                    "http_user":        lazylibrarian.HTTP_USER,
                    "http_port":        lazylibrarian.HTTP_PORT,
                    "http_pass":        lazylibrarian.HTTP_PASS,
                    "http_look":        lazylibrarian.HTTP_LOOK,
                    "http_look_list":   http_look_list,
                    "launch_browser":   checked(lazylibrarian.LAUNCH_BROWSER),
                    "logdir" :          lazylibrarian.LOGDIR,
                    "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
                    "imp_preflang":     lazylibrarian.IMP_PREFLANG,
                    "sab_host":         lazylibrarian.SAB_HOST,
                    "sab_port":         lazylibrarian.SAB_PORT,
                    "sab_api":          lazylibrarian.SAB_API,
                    "sab_user":         lazylibrarian.SAB_USER,
                    "sab_pass":         lazylibrarian.SAB_PASS,
                    "use_destination_copy": checked(lazylibrarian.DESTINATION_COPY),
                    "destination_dir":  lazylibrarian.DESTINATION_DIR,
                    "download_dir":     lazylibrarian.DOWNLOAD_DIR,
                    "sab_cat":          lazylibrarian.SAB_CAT,
                    "usenet_retention": lazylibrarian.USENET_RETENTION,
                    "use_blackhole":    checked(lazylibrarian.BLACKHOLE),
                    "blackholedir":     lazylibrarian.BLACKHOLEDIR,
                    "use_nzbmatrix" :   checked(lazylibrarian.NZBMATRIX),
                    "nzbmatrix_user" :  lazylibrarian.NZBMATRIX_USER,
                    "nzbmatrix_api" :   lazylibrarian.NZBMATRIX_API,
                    "use_newznab" :     checked(lazylibrarian.NEWZNAB),
                    "newznab_host" :    lazylibrarian.NEWZNAB_HOST,
                    "newznab_api" :     lazylibrarian.NEWZNAB_API,
                    "use_newzbin" :     checked(lazylibrarian.NEWZBIN),
                    "newzbin_uid" :     lazylibrarian.NEWZBIN_UID,
                    "newzbin_pass" :    lazylibrarian.NEWZBIN_PASS,
                    "use_kat" :     checked(lazylibrarian.KAT),
                    "use_bibliotik" :     checked(lazylibrarian.BIBLIOTIK),
                    "bibliotik_user" :     lazylibrarian.BIBLIOTIK_USER,
                    "bibliotik_pass" :    lazylibrarian.BIBLIOTIK_PASS,
                    "use_myanonamouse" :     checked(lazylibrarian.MYANONAMOUSE),
                    "myanonamouse_user" :     lazylibrarian.MYANONAMOUSE_USER,
                    "myanonamouse_pass" :    lazylibrarian.MYANONAMOUSE_PASS,
                    "search_interval" :    int(lazylibrarian.SEARCH_INTERVAL),
                    "scan_interval" :    int(lazylibrarian.SCAN_INTERVAL),
                    "ebook_dest_folder": lazylibrarian.EBOOK_DEST_FOLDER,
                    "ebook_dest_file": lazylibrarian.EBOOK_DEST_FILE,
                    "mag_dest_folder": lazylibrarian.MAG_DEST_FOLDER,
                    "mag_dest_file": lazylibrarian.MAG_DEST_FILE,
                    "use_twitter" :     lazylibrarian.USE_TWITTER,
                    "twitter_notify_onsnatch" :     lazylibrarian.TWITTER_NOTIFY_ONSNATCH,
                    "twitter_notify_ondownload" :     lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD,
                    "twitter_username" :     lazylibrarian.TWITTER_USERNAME,
                    "twitter_password" :     lazylibrarian.TWITTER_PASSWORD,
                    "twitter_prefix" :     lazylibrarian.TWITTER_PREFIX
                }
        return serve_template(templatename="config.html", title="Settings", config=config)    
Ejemplo n.º 2
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR,
                                     'data/interfaces/')
        http_look_list = [
            name for name in os.listdir(http_look_dir)
            if os.path.isdir(os.path.join(http_look_dir, name))
        ]

        config = {
            "http_host": lazylibrarian.HTTP_HOST,
            "http_user": lazylibrarian.HTTP_USER,
            "http_port": lazylibrarian.HTTP_PORT,
            "http_pass": lazylibrarian.HTTP_PASS,
            "http_look": lazylibrarian.HTTP_LOOK,
            "http_look_list": http_look_list,
            "launch_browser": checked(lazylibrarian.LAUNCH_BROWSER),
            "logdir": lazylibrarian.LOGDIR,
            "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
            "imp_preflang": lazylibrarian.IMP_PREFLANG,
            "imp_autoadd": lazylibrarian.IMP_AUTOADD,
            "sab_host": lazylibrarian.SAB_HOST,
            "sab_port": lazylibrarian.SAB_PORT,
            "sab_subdir": lazylibrarian.SAB_SUBDIR,
            "sab_api": lazylibrarian.SAB_API,
            "sab_user": lazylibrarian.SAB_USER,
            "sab_pass": lazylibrarian.SAB_PASS,
            "use_destination_copy": checked(lazylibrarian.DESTINATION_COPY),
            "destination_dir": lazylibrarian.DESTINATION_DIR,
            "download_dir": lazylibrarian.DOWNLOAD_DIR,
            "sab_cat": lazylibrarian.SAB_CAT,
            "usenet_retention": lazylibrarian.USENET_RETENTION,
            "use_blackhole": checked(lazylibrarian.BLACKHOLE),
            "blackholedir": lazylibrarian.BLACKHOLEDIR,
            "use_nzbmatrix": checked(lazylibrarian.NZBMATRIX),
            "nzbmatrix_user": lazylibrarian.NZBMATRIX_USER,
            "nzbmatrix_api": lazylibrarian.NZBMATRIX_API,
            "use_newznab": checked(lazylibrarian.NEWZNAB),
            "newznab_host": lazylibrarian.NEWZNAB_HOST,
            "newznab_api": lazylibrarian.NEWZNAB_API,
            "use_newzbin": checked(lazylibrarian.NEWZBIN),
            "newzbin_uid": lazylibrarian.NEWZBIN_UID,
            "newzbin_pass": lazylibrarian.NEWZBIN_PASS,
            "use_usenetcrawler": checked(lazylibrarian.USENETCRAWLER),
            "usenetcrawler_host": lazylibrarian.USENETCRAWLER_HOST,
            "usenetcrawler_api": lazylibrarian.USENETCRAWLER_API,
        }
        return serve_template(templatename="config.html",
                              title="Settings",
                              config=config)
Ejemplo n.º 3
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR, 'data/interfaces/')
        http_look_list = [ name for name in os.listdir(http_look_dir) if os.path.isdir(os.path.join(http_look_dir, name)) ]

        config = {
                    "http_host":        lazylibrarian.HTTP_HOST,
                    "http_user":        lazylibrarian.HTTP_USER,
                    "http_port":        lazylibrarian.HTTP_PORT,
                    "http_pass":        lazylibrarian.HTTP_PASS,
                    "http_look":        lazylibrarian.HTTP_LOOK,
                    "http_look_list":   http_look_list,
                    "launch_browser":   checked(lazylibrarian.LAUNCH_BROWSER),
                    "logdir" :          lazylibrarian.LOGDIR,
                    "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
                    "imp_preflang":     lazylibrarian.IMP_PREFLANG,
                    "imp_autoadd":      lazylibrarian.IMP_AUTOADD,
                    "sab_host":         lazylibrarian.SAB_HOST,
                    "sab_port":         lazylibrarian.SAB_PORT,
                    "sab_subdir":         lazylibrarian.SAB_SUBDIR,                    
                    "sab_api":          lazylibrarian.SAB_API,
                    "sab_user":         lazylibrarian.SAB_USER,
                    "sab_pass":         lazylibrarian.SAB_PASS,
                    "use_destination_copy": checked(lazylibrarian.DESTINATION_COPY),
                    "destination_dir":  lazylibrarian.DESTINATION_DIR,
                    "download_dir":     lazylibrarian.DOWNLOAD_DIR,
                    "sab_cat":          lazylibrarian.SAB_CAT,
                    "usenet_retention": lazylibrarian.USENET_RETENTION,
                    "use_blackhole":    checked(lazylibrarian.BLACKHOLE),
                    "blackholedir":     lazylibrarian.BLACKHOLEDIR,
                    "use_newznab" :     checked(lazylibrarian.NEWZNAB),
                    "newznab_host" :    lazylibrarian.NEWZNAB_HOST,
                    "newznab_api" :     lazylibrarian.NEWZNAB_API,
                    "use_newznab2" :     checked(lazylibrarian.NEWZNAB2),
                    "newznab_host2" :    lazylibrarian.NEWZNAB_HOST2,
                    "newznab_api2" :     lazylibrarian.NEWZNAB_API2,
                    "use_newzbin" :     checked(lazylibrarian.NEWZBIN),
                    "newzbin_uid" :     lazylibrarian.NEWZBIN_UID,
                    "newzbin_pass" :    lazylibrarian.NEWZBIN_PASS,

                    "use_usenetcrawler" :     checked(lazylibrarian.USENETCRAWLER),
                    "usenetcrawler_host" :     lazylibrarian.USENETCRAWLER_HOST,
                    "usenetcrawler_api" :    lazylibrarian.USENETCRAWLER_API,

                    "ebook_type" :		lazylibrarian.EBOOK_TYPE,
                    "gr_api" :		lazylibrarian.GR_API,
                }
        return serve_template(templatename="config.html", title="Settings", config=config)    
Ejemplo n.º 4
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR,
                                     'data/interfaces/')
        http_look_list = [
            name for name in os.listdir(http_look_dir)
            if os.path.isdir(os.path.join(http_look_dir, name))
        ]

        config = {
            "http_host": lazylibrarian.HTTP_HOST,
            "http_user": lazylibrarian.HTTP_USER,
            "http_port": lazylibrarian.HTTP_PORT,
            "http_pass": lazylibrarian.HTTP_PASS,
            "http_look": lazylibrarian.HTTP_LOOK,
            "http_look_list": http_look_list,
            "launch_browser": checked(lazylibrarian.LAUNCH_BROWSER),
            "logdir": lazylibrarian.LOGDIR,
            "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
            "imp_preflang": lazylibrarian.IMP_PREFLANG,
            "sab_host": lazylibrarian.SAB_HOST,
            "sab_port": lazylibrarian.SAB_PORT,
            "sab_api": lazylibrarian.SAB_API,
            "sab_user": lazylibrarian.SAB_USER,
            "sab_pass": lazylibrarian.SAB_PASS,
            "sab_dir": lazylibrarian.SAB_DIR,
            "sab_cat": lazylibrarian.SAB_CAT,
            "usenet_retention": lazylibrarian.USENET_RETENTION,
            "use_blackhole": checked(lazylibrarian.BLACKHOLE),
            "blackholedir": lazylibrarian.BLACKHOLEDIR,
            "use_nzbmatrix": checked(lazylibrarian.NZBMATRIX),
            "nzbmatrix_user": lazylibrarian.NZBMATRIX_USER,
            "nzbmatrix_api": lazylibrarian.NZBMATRIX_API,
            "use_newznab": checked(lazylibrarian.NEWZNAB),
            "newznab_host": lazylibrarian.NEWZNAB_HOST,
            "newznab_api": lazylibrarian.NEWZNAB_API,
            "use_nzbsorg": checked(lazylibrarian.NZBSORG),
            "nzbsorg_uid": lazylibrarian.NZBSORG_UID,
            "nzbsorg_hash": lazylibrarian.NZBSORG_HASH,
            "use_newzbin": checked(lazylibrarian.NEWZBIN),
            "newzbin_uid": lazylibrarian.NEWZBIN_UID,
            "newzbin_pass": lazylibrarian.NEWZBIN_PASS,
        }
        return serve_template(templatename="config.html",
                              title="Settings",
                              config=config)
Ejemplo n.º 5
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR, 'data/interfaces/')
        http_look_list = [ name for name in os.listdir(http_look_dir) if os.path.isdir(os.path.join(http_look_dir, name)) ]

        config = {
                    "http_host":        lazylibrarian.HTTP_HOST,
                    "http_user":        lazylibrarian.HTTP_USER,
                    "http_port":        lazylibrarian.HTTP_PORT,
                    "http_pass":        lazylibrarian.HTTP_PASS,
                    "http_look":        lazylibrarian.HTTP_LOOK,
                    "http_look_list":   http_look_list,
                    "launch_browser":   checked(lazylibrarian.LAUNCH_BROWSER),
                    "logdir" :          lazylibrarian.LOGDIR,
                    "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
                    "imp_preflang":       lazylibrarian.IMP_PREFLANG,
                    "sab_host":         lazylibrarian.SAB_HOST,
                    "sab_port":         lazylibrarian.SAB_PORT,
                    "sab_api":          lazylibrarian.SAB_API,
                    "sab_user":         lazylibrarian.SAB_USER,
                    "sab_pass":         lazylibrarian.SAB_PASS,
                    "sab_dir":          lazylibrarian.SAB_DIR,
                    "sab_cat":          lazylibrarian.SAB_CAT,
                    "usenet_retention":          lazylibrarian.USENET_RETENTION,
                    "use_blackhole":       checked(lazylibrarian.BLACKHOLE),
                    "blackholedir":        lazylibrarian.BLACKHOLEDIR,
                    "use_nzbmatrix" :   checked(lazylibrarian.NZBMATRIX),
                    "nzbmatrix_user" :  lazylibrarian.NZBMATRIX_USER,
                    "nzbmatrix_api" :   lazylibrarian.NZBMATRIX_API,
                    "use_newznab" :     checked(lazylibrarian.NEWZNAB),
                    "newznab_host" :    lazylibrarian.NEWZNAB_HOST,
                    "newznab_api" :     lazylibrarian.NEWZNAB_API,
                    "use_nzbsorg" :     checked(lazylibrarian.NZBSORG),
                    "nzbsorg_uid" :     lazylibrarian.NZBSORG_UID,
                    "nzbsorg_hash" :    lazylibrarian.NZBSORG_HASH,
                    "use_newzbin" :     checked(lazylibrarian.NEWZBIN),
                    "newzbin_uid" :     lazylibrarian.NEWZBIN_UID,
                    "newzbin_pass" :    lazylibrarian.NEWZBIN_PASS,
                }
        return serve_template(templatename="config.html", title="Settings", config=config)    
Ejemplo n.º 6
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR, 'data/interfaces/')
        http_look_list = [ name for name in os.listdir(http_look_dir) if os.path.isdir(os.path.join(http_look_dir, name)) ]
	status_list = [ 'Skipped','Wanted', 'Open', 'Ignored' ]
        config = {
                    "http_host":        lazylibrarian.HTTP_HOST,
		    "http_root":	lazylibrarian.HTTP_ROOT,
                    "http_user":        lazylibrarian.HTTP_USER,
                    "http_port":        lazylibrarian.HTTP_PORT,
                    "http_pass":        lazylibrarian.HTTP_PASS,
                    "http_look":        lazylibrarian.HTTP_LOOK,
                    "http_look_list":   http_look_list,
                    "match_ratio":      lazylibrarian.MATCH_RATIO,
                    "launch_browser":   checked(lazylibrarian.LAUNCH_BROWSER),
		    "proxy_host":	lazylibrarian.PROXY_HOST,
		    "proxy_type":	lazylibrarian.PROXY_TYPE,
                    "logdir" :          lazylibrarian.LOGDIR,
                    "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
                    "imp_preflang":     lazylibrarian.IMP_PREFLANG,
                    "imp_autoadd":      lazylibrarian.IMP_AUTOADD,
                    "sab_host":         lazylibrarian.SAB_HOST,
                    "sab_port":         lazylibrarian.SAB_PORT,
                    "sab_subdir":       lazylibrarian.SAB_SUBDIR,                    
                    "sab_api":          lazylibrarian.SAB_API,
                    "sab_user":         lazylibrarian.SAB_USER,
                    "sab_pass":         lazylibrarian.SAB_PASS,
                    "destination_copy": checked(lazylibrarian.DESTINATION_COPY),
                    "destination_dir":  lazylibrarian.DESTINATION_DIR,
                    "download_dir":     lazylibrarian.DOWNLOAD_DIR,
                    "sab_cat":          lazylibrarian.SAB_CAT,
                    "usenet_retention": lazylibrarian.USENET_RETENTION,
                    "nzb_blackholedir": lazylibrarian.NZB_BLACKHOLEDIR,
                    "torrent_dir":      lazylibrarian.TORRENT_DIR,
                    "numberofseeders":  lazylibrarian.NUMBEROFSEEDERS,
                    "use_newznab" :     checked(lazylibrarian.NEWZNAB),
                    "newznab_host" :    lazylibrarian.NEWZNAB_HOST,
                    "newznab_api" :     lazylibrarian.NEWZNAB_API,
                    "use_newznab2" :    checked(lazylibrarian.NEWZNAB2),
                    "newznab_host2" :   lazylibrarian.NEWZNAB_HOST2,
                    "newznab_api2" :    lazylibrarian.NEWZNAB_API2,
                    "use_newzbin" :     checked(lazylibrarian.NEWZBIN),
                    "newzbin_uid" :     lazylibrarian.NEWZBIN_UID,
                    "newzbin_pass" :    lazylibrarian.NEWZBIN_PASS,
                    "use_kat" :         checked(lazylibrarian.KAT),
                    "use_usenetcrawler" :     checked(lazylibrarian.USENETCRAWLER),
                    "usenetcrawler_host" :    lazylibrarian.USENETCRAWLER_HOST,
                    "usenetcrawler_api" :     lazylibrarian.USENETCRAWLER_API,
                    "search_interval" :       int(lazylibrarian.SEARCH_INTERVAL),
                    "scan_interval" :         int(lazylibrarian.SCAN_INTERVAL),
                    "versioncheck_interval" : int(lazylibrarian.VERSIONCHECK_INTERVAL),
		    "full_scan":	      checked(lazylibrarian.FULL_SCAN),	
		    "add_author":	      checked(lazylibrarian.ADD_AUTHOR),
		    "notfound_status":	      lazylibrarian.NOTFOUND_STATUS,
		    "status_list":	      status_list,
                    "ebook_dest_folder":      lazylibrarian.EBOOK_DEST_FOLDER,
                    "ebook_dest_file":        lazylibrarian.EBOOK_DEST_FILE,
                    "mag_dest_folder":        lazylibrarian.MAG_DEST_FOLDER,
                    "mag_dest_file":          lazylibrarian.MAG_DEST_FILE,
                    "use_twitter" :           checked(lazylibrarian.USE_TWITTER),
                    "twitter_notify_onsnatch" :       checked(lazylibrarian.TWITTER_NOTIFY_ONSNATCH),
                    "twitter_notify_ondownload" :     checked(lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD), 
                    "use_boxcar" :                    checked(lazylibrarian.USE_BOXCAR),
                    "boxcar_notify_onsnatch" :        checked(lazylibrarian.BOXCAR_NOTIFY_ONSNATCH),
                    "boxcar_notify_ondownload" :      checked(lazylibrarian.BOXCAR_NOTIFY_ONDOWNLOAD),
                    "boxcar_token" :                  lazylibrarian.BOXCAR_TOKEN,
                    "use_pushbullet":                 checked(lazylibrarian.USE_PUSHBULLET),
                    "pushbullet_notify_onsnatch" :    checked(lazylibrarian.PUSHBULLET_NOTIFY_ONSNATCH),
                    "pushbullet_notify_ondownload" :  checked(lazylibrarian.PUSHBULLET_NOTIFY_ONDOWNLOAD),
                    "pushbullet_token" :              lazylibrarian.PUSHBULLET_TOKEN,
                    "pushbullet_deviceid" :           lazylibrarian.PUSHBULLET_DEVICEID,
                    "nma_enabled":		      checked(lazylibrarian.NMA_ENABLED),
		    "nma_apikey": 		      lazylibrarian.NMA_APIKEY,
		    "nma_priority": 		      int(lazylibrarian.NMA_PRIORITY),
		    "nma_onsnatch":                   checked(lazylibrarian.NMA_ONSNATCH),
                    "ebook_type" :                    lazylibrarian.EBOOK_TYPE,
                    "gr_api" :                        lazylibrarian.GR_API,
                    "gb_api" :                        lazylibrarian.GB_API,
                    "book_api" :                      lazylibrarian.BOOK_API,
                    "use_nzb" :                       checked(lazylibrarian.USE_NZB),
                    "use_tor" :                       checked(lazylibrarian.USE_TOR),
                    "nzb_downloader_sabnzbd" :        checked(lazylibrarian.NZB_DOWNLOADER_SABNZBD),
                    "nzb_downloader_blackhole" :      checked(lazylibrarian.NZB_DOWNLOADER_BLACKHOLE),
                    "tor_downloader_utorrent" :       checked(lazylibrarian.TOR_DOWNLOADER_UTORRENT),
                    "tor_downloader_blackhole" :      checked(lazylibrarian.TOR_DOWNLOADER_BLACKHOLE),
                    "utorrent_host":                  lazylibrarian.UTORRENT_HOST,
                    "utorrent_user":                  lazylibrarian.UTORRENT_USER,
                    "utorrent_pass":                  lazylibrarian.UTORRENT_PASS,
                    "utorrent_label":                 lazylibrarian.UTORRENT_LABEL
                }
        return serve_template(templatename="config.html", title="Settings", config=config)    
Ejemplo n.º 7
0
    def config(self):
        http_look_dir = os.path.join(lazylibrarian.PROG_DIR, 'data/interfaces/')
        http_look_list = [ name for name in os.listdir(http_look_dir) if os.path.isdir(os.path.join(http_look_dir, name)) ]

        config = {
                    "http_host":        lazylibrarian.HTTP_HOST,
                    "http_user":        lazylibrarian.HTTP_USER,
                    "http_port":        lazylibrarian.HTTP_PORT,
                    "http_pass":        lazylibrarian.HTTP_PASS,
                    "http_look":        lazylibrarian.HTTP_LOOK,
                    "http_look_list":   http_look_list,
                    "launch_browser":   checked(lazylibrarian.LAUNCH_BROWSER),
                    "logdir" :          lazylibrarian.LOGDIR,
                    "use_imp_onlyisbn": checked(lazylibrarian.IMP_ONLYISBN),
                    "imp_preflang":     lazylibrarian.IMP_PREFLANG,
                    "imp_autoadd":      lazylibrarian.IMP_AUTOADD,
                    "sab_host":         lazylibrarian.SAB_HOST,
                    "sab_port":         lazylibrarian.SAB_PORT,
                    "sab_subdir":         lazylibrarian.SAB_SUBDIR,                    
                    "sab_api":          lazylibrarian.SAB_API,
                    "sab_user":         lazylibrarian.SAB_USER,
                    "sab_pass":         lazylibrarian.SAB_PASS,
                    "destination_copy": checked(lazylibrarian.DESTINATION_COPY),
                    "destination_dir":  lazylibrarian.DESTINATION_DIR,
                    "download_dir":     lazylibrarian.DOWNLOAD_DIR,
                    "sab_cat":          lazylibrarian.SAB_CAT,
                    "usenet_retention": lazylibrarian.USENET_RETENTION,
                    "use_blackhole":    checked(lazylibrarian.BLACKHOLE),
                    "blackholedir":     lazylibrarian.BLACKHOLEDIR,
                    "use_newznab" :     checked(lazylibrarian.NEWZNAB),
                    "newznab_host" :    lazylibrarian.NEWZNAB_HOST,
                    "newznab_api" :     lazylibrarian.NEWZNAB_API,
                    "use_newznab2" :     checked(lazylibrarian.NEWZNAB2),
                    "newznab_host2" :    lazylibrarian.NEWZNAB_HOST2,
                    "newznab_api2" :     lazylibrarian.NEWZNAB_API2,
                    "use_newzbin" :     checked(lazylibrarian.NEWZBIN),
                    "newzbin_uid" :     lazylibrarian.NEWZBIN_UID,
                    "newzbin_pass" :    lazylibrarian.NEWZBIN_PASS,

                    "use_usenetcrawler" :     checked(lazylibrarian.USENETCRAWLER),
                    "usenetcrawler_host" :     lazylibrarian.USENETCRAWLER_HOST,
                    "usenetcrawler_api" :    lazylibrarian.USENETCRAWLER_API,
                    "search_interval" :    int(lazylibrarian.SEARCH_INTERVAL),
                    "scan_interval" :    int(lazylibrarian.SCAN_INTERVAL),
                    "versioncheck_interval" :    int(lazylibrarian.VERSIONCHECK_INTERVAL),
                    "ebook_dest_folder": lazylibrarian.EBOOK_DEST_FOLDER,
                    "ebook_dest_file": lazylibrarian.EBOOK_DEST_FILE,
                    "mag_dest_folder": lazylibrarian.MAG_DEST_FOLDER,
                    "mag_dest_file": lazylibrarian.MAG_DEST_FILE,
                    "use_twitter" :     checked(lazylibrarian.USE_TWITTER),
                    "twitter_notify_onsnatch" :     checked(lazylibrarian.TWITTER_NOTIFY_ONSNATCH),
                    "twitter_notify_ondownload" :     checked(lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD), 

                    "ebook_type" :		lazylibrarian.EBOOK_TYPE,
                    "gr_api" :		lazylibrarian.GR_API,
                    "gb_api" :      lazylibrarian.GB_API,
                    "book_api" :    lazylibrarian.BOOK_API
                }
        return serve_template(templatename="config.html", title="Settings", config=config)    
Ejemplo n.º 8
0
 def config(self):
     http_look_dir = os.path.join(lazylibrarian.PROG_DIR,
                                  'data/interfaces/')
     http_look_list = [
         name for name in os.listdir(http_look_dir)
         if os.path.isdir(os.path.join(http_look_dir, name))
     ]
     status_list = ['Skipped', 'Wanted', 'Open', 'Ignored']
     config = {
         "http_host":
         lazylibrarian.HTTP_HOST,
         "http_root":
         lazylibrarian.HTTP_ROOT,
         "http_user":
         lazylibrarian.HTTP_USER,
         "http_port":
         lazylibrarian.HTTP_PORT,
         "http_pass":
         lazylibrarian.HTTP_PASS,
         "http_look":
         lazylibrarian.HTTP_LOOK,
         "http_look_list":
         http_look_list,
         "match_ratio":
         lazylibrarian.MATCH_RATIO,
         "launch_browser":
         checked(lazylibrarian.LAUNCH_BROWSER),
         "proxy_host":
         lazylibrarian.PROXY_HOST,
         "proxy_type":
         lazylibrarian.PROXY_TYPE,
         "logdir":
         lazylibrarian.LOGDIR,
         "use_imp_onlyisbn":
         checked(lazylibrarian.IMP_ONLYISBN),
         "imp_preflang":
         lazylibrarian.IMP_PREFLANG,
         "imp_autoadd":
         lazylibrarian.IMP_AUTOADD,
         "sab_host":
         lazylibrarian.SAB_HOST,
         "sab_port":
         lazylibrarian.SAB_PORT,
         "sab_subdir":
         lazylibrarian.SAB_SUBDIR,
         "sab_api":
         lazylibrarian.SAB_API,
         "sab_user":
         lazylibrarian.SAB_USER,
         "sab_pass":
         lazylibrarian.SAB_PASS,
         "nzbget_host":
         lazylibrarian.NZBGET_HOST,
         "nzbget_user":
         lazylibrarian.NZBGET_USER,
         "nzbget_pass":
         lazylibrarian.NZBGET_PASS,
         "nzbget_cat":
         lazylibrarian.NZBGET_CATEGORY,
         "nzbget_priority":
         lazylibrarian.NZBGET_PRIORITY,
         "destination_copy":
         checked(lazylibrarian.DESTINATION_COPY),
         "destination_dir":
         lazylibrarian.DESTINATION_DIR,
         "download_dir":
         lazylibrarian.DOWNLOAD_DIR,
         "sab_cat":
         lazylibrarian.SAB_CAT,
         "usenet_retention":
         lazylibrarian.USENET_RETENTION,
         "nzb_blackholedir":
         lazylibrarian.NZB_BLACKHOLEDIR,
         "torrent_dir":
         lazylibrarian.TORRENT_DIR,
         "numberofseeders":
         lazylibrarian.NUMBEROFSEEDERS,
         "use_newznab":
         checked(lazylibrarian.NEWZNAB),
         "newznab_host":
         lazylibrarian.NEWZNAB_HOST,
         "newznab_api":
         lazylibrarian.NEWZNAB_API,
         "use_newznab2":
         checked(lazylibrarian.NEWZNAB2),
         "newznab_host2":
         lazylibrarian.NEWZNAB_HOST2,
         "newznab_api2":
         lazylibrarian.NEWZNAB_API2,
         "use_newzbin":
         checked(lazylibrarian.NEWZBIN),
         "newzbin_uid":
         lazylibrarian.NEWZBIN_UID,
         "newzbin_pass":
         lazylibrarian.NEWZBIN_PASS,
         "use_kat":
         checked(lazylibrarian.KAT),
         "use_usenetcrawler":
         checked(lazylibrarian.USENETCRAWLER),
         "usenetcrawler_host":
         lazylibrarian.USENETCRAWLER_HOST,
         "usenetcrawler_api":
         lazylibrarian.USENETCRAWLER_API,
         "search_interval":
         int(lazylibrarian.SEARCH_INTERVAL),
         "scan_interval":
         int(lazylibrarian.SCAN_INTERVAL),
         "versioncheck_interval":
         int(lazylibrarian.VERSIONCHECK_INTERVAL),
         "full_scan":
         checked(lazylibrarian.FULL_SCAN),
         "add_author":
         checked(lazylibrarian.ADD_AUTHOR),
         "notfound_status":
         lazylibrarian.NOTFOUND_STATUS,
         "status_list":
         status_list,
         "ebook_dest_folder":
         lazylibrarian.EBOOK_DEST_FOLDER,
         "ebook_dest_file":
         lazylibrarian.EBOOK_DEST_FILE,
         "mag_dest_folder":
         lazylibrarian.MAG_DEST_FOLDER,
         "mag_dest_file":
         lazylibrarian.MAG_DEST_FILE,
         "use_twitter":
         checked(lazylibrarian.USE_TWITTER),
         "twitter_notify_onsnatch":
         checked(lazylibrarian.TWITTER_NOTIFY_ONSNATCH),
         "twitter_notify_ondownload":
         checked(lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD),
         "use_boxcar":
         checked(lazylibrarian.USE_BOXCAR),
         "boxcar_notify_onsnatch":
         checked(lazylibrarian.BOXCAR_NOTIFY_ONSNATCH),
         "boxcar_notify_ondownload":
         checked(lazylibrarian.BOXCAR_NOTIFY_ONDOWNLOAD),
         "boxcar_token":
         lazylibrarian.BOXCAR_TOKEN,
         "use_pushbullet":
         checked(lazylibrarian.USE_PUSHBULLET),
         "pushbullet_notify_onsnatch":
         checked(lazylibrarian.PUSHBULLET_NOTIFY_ONSNATCH),
         "pushbullet_notify_ondownload":
         checked(lazylibrarian.PUSHBULLET_NOTIFY_ONDOWNLOAD),
         "pushbullet_token":
         lazylibrarian.PUSHBULLET_TOKEN,
         "pushbullet_deviceid":
         lazylibrarian.PUSHBULLET_DEVICEID,
         "use_pushover":
         checked(lazylibrarian.USE_PUSHOVER),
         "pushover_onsnatch":
         checked(lazylibrarian.PUSHOVER_ONSNATCH),
         "pushover_ondownload":
         checked(lazylibrarian.PUSHOVER_ONDOWNLOAD),
         "pushover_priority":
         lazylibrarian.PUSHOVER_PRIORITY,
         "pushover_keys":
         lazylibrarian.PUSHOVER_KEYS,
         "pushover_apitoken":
         lazylibrarian.PUSHOVER_APITOKEN,
         "nma_enabled":
         checked(lazylibrarian.NMA_ENABLED),
         "nma_apikey":
         lazylibrarian.NMA_APIKEY,
         "nma_priority":
         int(lazylibrarian.NMA_PRIORITY),
         "nma_onsnatch":
         checked(lazylibrarian.NMA_ONSNATCH),
         "ebook_type":
         lazylibrarian.EBOOK_TYPE,
         "gr_api":
         lazylibrarian.GR_API,
         "gb_api":
         lazylibrarian.GB_API,
         "book_api":
         lazylibrarian.BOOK_API,
         "use_nzb":
         checked(lazylibrarian.USE_NZB),
         "use_tor":
         checked(lazylibrarian.USE_TOR),
         "nzb_downloader_sabnzbd":
         checked(lazylibrarian.NZB_DOWNLOADER_SABNZBD),
         "nzb_downloader_nzbget":
         checked(lazylibrarian.NZB_DOWNLOADER_NZBGET),
         "nzb_downloader_blackhole":
         checked(lazylibrarian.NZB_DOWNLOADER_BLACKHOLE),
         "tor_downloader_utorrent":
         checked(lazylibrarian.TOR_DOWNLOADER_UTORRENT),
         "tor_downloader_transmission":
         checked(lazylibrarian.TOR_DOWNLOADER_TRANSMISSION),
         "tor_downloader_deluge":
         checked(lazylibrarian.TOR_DOWNLOADER_DELUGE),
         "tor_downloader_blackhole":
         checked(lazylibrarian.TOR_DOWNLOADER_BLACKHOLE),
         "utorrent_host":
         lazylibrarian.UTORRENT_HOST,
         "utorrent_user":
         lazylibrarian.UTORRENT_USER,
         "utorrent_pass":
         lazylibrarian.UTORRENT_PASS,
         "utorrent_label":
         lazylibrarian.UTORRENT_LABEL,
         "transmission_host":
         lazylibrarian.TRANSMISSION_HOST,
         "transmission_user":
         lazylibrarian.TRANSMISSION_USER,
         "transmission_pass":
         lazylibrarian.TRANSMISSION_PASS,
         "deluge_host":
         lazylibrarian.DELUGE_HOST,
         "deluge_port":
         lazylibrarian.DELUGE_PORT,
         "deluge_user":
         lazylibrarian.DELUGE_USER,
         "deluge_pass":
         lazylibrarian.DELUGE_PASS
     }
     return serve_template(templatename="config.html",
                           title="Settings",
                           config=config)