⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultargs.py

📁 bittorrent source by python. please enjoy
💻 PY
📖 第 1 页 / 共 2 页
字号:
       "/scrape and web page). Only matters if allowed_dir is not set")),    ('scrape_allowed', 'full',     _("scrape access allowed (can be none, specific or full)")),    ('max_give', 200,     _("maximum number of peers to give with any one request")),    ('twisted', -1,     _("Use Twisted network libraries for network connections. 1 means use twisted, 0 means do not use twisted, -1 means autodetect, and prefer twisted")),    ('pid', 'bittorrent-tracker.pid',     "Path to PID file"),    ('max_incomplete', MAX_INCOMPLETE,     _("max number of outgoing incomplete connections")),    ]def get_defaults(ui):    assert ui in ("bittorrent" , "bittorrent-curses", "bittorrent-console" ,                  "maketorrent",                      "maketorrent-console",                                 "launchmany-curses", "launchmany-console" ,                                                      "bittorrent-tracker" ,                  "test-client"                  )    r = []    if ui == 'test-client':        ui = 'bittorrent-test-client'    if ui == "bittorrent-tracker":        r.extend(tracker_options)    elif ui.startswith('bittorrent') or ui.startswith('launchmany'):        r.extend(common_options)    if ui == 'bittorrent':        r.extend([            ('publish', '',             _("path to the file that you are publishing (seeding).")),            ('verbose', False,             _("display verbose information in user interface")),            ('debug', False,             _("provide debugging tools in user interface")),            ('pause', False,             _("start downloader in paused state")),            ('open_from', u'',             'local directory to look in for .torrent files to open'),            ('start_minimized', False,             _("Start %s minimized")%app_name),            ('force_start_minimized', False,             _("Start %s minimized (but do not save that preference)")%app_name),            ('confirm_quit', True,             _("Confirm before quitting %s")%app_name),            ('new_version', '',             _("override the version provided by the http version check "               "and enable version check debugging mode")),            ('current_version', '',             _("override the current version used in the version check "               "and enable version check debugging mode")),            # remember GUI state            ('progressbar_style', 3,             _("The style of progressbar to show.  0 means no progress "               "bar.  1 is an ordinary progress bar.  2 is a progress "               "bar that shows transferring, available and missing "               "percentages as well.  3 is a piece bar which "               "color-codes each piece in the torrent based on its "               "availability.")),            ('geometry', '',             _("specify window size and position, in the format: "               "WIDTHxHEIGHT+XOFFSET+YOFFSET")),            ('start_maximized', False,             _("Start %s maximized")%app_name),            ('column_widths', {},             _("Widths of columns in torrent list in main window")),            ('column_order', ['name', 'progress', 'eta', 'drate',                              'urate', 'peers', 'priority', 'state'],             _("Order of columns in torrent list in main window")),            ('enabled_columns', ['name', 'progress', 'eta', 'drate',                                 'priority'],             _("Enabled columns in torrent list in main window")),            ('sort_column', 'name',             _("Default sort column in torrent list in main window")),            ('sort_ascending', True,             _("Default sort order in torrent list in main window")),            ('toolbar_text', True,             _("Whether to show text on the toolbar or not")),            ('toolbar_size', 24,             _("Size in pixels of toolbar icons")),            ('show_details', False,             _("Show details panel on startup")),            ('details_tab', 0,             _("Which tab in the details panel to show by default")),            ('splitter_height', 300,             _("Height of the details splitter when it is enabled")),            ('ask_for_save', True,             _("whether or not to ask for a location to save downloaded "               "files in")),            ('max_upload_rate', 40960, # 40KB/s up             _("maximum B/s to upload at")),            ])        if os.name == 'nt':            r.extend([                ('launch_on_startup', True,                 _("Launch %s when Windows starts") % app_name),                ('minimize_to_tray', True,                 _("Minimize to the system tray")),                ('close_to_tray', True,                 _("Close to the system tray")),                ('enforce_association', True,                 _("Enforce .torrent file associations on startup")),            ])    if ui in ('bittorrent', 'maketorrent'):        r.append(            ('theme', 'default',             _("Icon theme to use"))            )    if ui.startswith('bittorrent') and ui != "bittorrent-tracker":        r.extend([            ('max_uploads', -1,             _("the maximum number of uploads to allow at once. -1 means a "               "(hopefully) reasonable number based on --max_upload_rate. "               "The automatic values are only sensible when running one "               "torrent at a time.")),            ('save_in', u'',             _("local directory where the torrent contents will be saved. The "               "file (single-file torrents) or directory (batch torrents) will "               "be created under this directory using the default name "               "specified in the .torrent file. See also --save_as.")),            ('save_incomplete_in', u'',             _("local directory where the incomplete torrent downloads will be "               "stored until completion.  Upon completion, downloads will be "               "moved to the directory specified by --save_in.")),            ])    if ui.startswith('launchmany'):        r.extend([            ('max_uploads', 6,             _("the maximum number of uploads to allow at once. -1 means a "               "(hopefully) reasonable number based on --max_upload_rate. The "               "automatic values are only sensible when running one torrent at "               "a time.")),            ('save_in', u'',             _("local directory where the torrents will be saved, using a "               "name determined by --saveas_style. If this is left empty "               "each torrent will be saved under the directory of the "               "corresponding .torrent file")),            ('parse_dir_interval', 60,              _("how often to rescan the torrent directory, in seconds") ),            ('launch_delay', 0,             _("wait this many seconds after noticing a torrent before starting it, to avoid race with tracker")),            ('saveas_style', 4,              _("How to name torrent downloads: "                "1: use name OF torrent file (minus .torrent);  "                "2: use name encoded IN torrent file;  "                "3: create a directory with name OF torrent file "                "(minus .torrent) and save in that directory using name "                "encoded IN torrent file;  "                "4: if name OF torrent file (minus .torrent) and name "                "encoded IN torrent file are identical, use that "                "name (style 1/2), otherwise create an intermediate "                "directory as in style 3;  "                "CAUTION: options 1 and 2 have the ability to "                "overwrite files without warning and may present "                "security issues."                ) ),            ('display_path', ui == 'launchmany-console' and True or False,              _("whether to display the full path or the torrent contents for "                "each torrent") ),            ])    if ui.startswith('launchmany') or ui == 'maketorrent':        r.append(            ('torrent_dir', u'',             _("directory to look for .torrent files (semi-recursive)")),)    if ui in ('bittorrent-curses', 'bittorrent-console'):        r.extend([            ('save_as', u'',             _("file name (for single-file torrents) or directory name (for "               "batch torrents) to save the torrent as, overriding the "               "default name in the torrent. See also --save_in")),            ('spew', False,             _("whether to display diagnostic info to stdout")),])    if ui == 'bittorrent-console' :        r.extend([            ('display_interval', 5,            _("seconds between updates of displayed information")),            ] )    elif ui.startswith('launchmany-console'):        r.extend([            ('display_interval', 60,            _("seconds between updates of displayed information")),            ] )    elif ui.startswith('launchmany-curses'):        r.extend([            ('display_interval', 3,            _("seconds between updates of displayed information")),            ] )    if ui.startswith('maketorrent'):        r.extend([            ('title', '',             _("optional human-readable title for entire .torrent")),            ('comment', '',             _("optional human-readable comment to put in .torrent")),            ('piece_size_pow2', 0,             _("which power of two to set the piece size to, "               "0 means pick a good piece size")),            ('tracker_name', '',             _("default tracker name")),            ('tracker_list', '', ''),            ('use_tracker', True,             _("if false then make a trackerless torrent, instead of "               "announce URL, use reliable node in form of <ip>:<port> or an "               "empty string to pull some nodes from your routing table")),            ('verbose', False,             _("display verbose information in user interface")),            ('debug', False,             _("provide debugging tools in user interface")),            ])    r.extend(basic_options)    if (ui.startswith('bittorrent') or ui.startswith('launchmany')) \           and ui != "bittorrent-tracker":        r.extend(rare_options)    return r

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -