deluge.ui.console package¶
Subpackages¶
- deluge.ui.console.commands package
- Submodules
- deluge.ui.console.commands.add module
- deluge.ui.console.commands.cache module
- deluge.ui.console.commands.config module
- deluge.ui.console.commands.connect module
- deluge.ui.console.commands.debug module
- deluge.ui.console.commands.gui module
- deluge.ui.console.commands.halt module
- deluge.ui.console.commands.help module
- deluge.ui.console.commands.info module
- deluge.ui.console.commands.manage module
- deluge.ui.console.commands.move module
- deluge.ui.console.commands.pause module
- deluge.ui.console.commands.plugin module
- deluge.ui.console.commands.quit module
- deluge.ui.console.commands.recheck module
- deluge.ui.console.commands.resume module
- deluge.ui.console.commands.rm module
- deluge.ui.console.commands.status module
- deluge.ui.console.commands.update-tracker module
- Module contents
- deluge.ui.console.modes package
- Submodules
- deluge.ui.console.modes.add_util module
- deluge.ui.console.modes.addtorrents module
- deluge.ui.console.modes.alltorrents module
- deluge.ui.console.modes.basemode module
- deluge.ui.console.modes.column module
- deluge.ui.console.modes.connectionmanager module
- deluge.ui.console.modes.eventview module
- deluge.ui.console.modes.format_utils module
- deluge.ui.console.modes.input_popup module
- deluge.ui.console.modes.legacy module
- deluge.ui.console.modes.popup module
- deluge.ui.console.modes.preference_panes module
- deluge.ui.console.modes.preferences module
- deluge.ui.console.modes.torrent_actions module
- deluge.ui.console.modes.torrentdetail module
- Module contents
Submodules¶
deluge.ui.console.colors module¶
- exception deluge.ui.console.colors.BadColorString¶
Bases: exceptions.Exception
- deluge.ui.console.colors.get_line_length(line, encoding='UTF-8')¶
Returns the string length without the color formatting.
- deluge.ui.console.colors.get_line_width(line, encoding='UTF-8')¶
Get width of string considering double width characters
- deluge.ui.console.colors.init_colors()¶
- deluge.ui.console.colors.parse_color_string(s, encoding='UTF-8')¶
Parses a string and returns a list of 2-tuples (color, string).
:param s:, string to parse :param encoding: the encoding to use on output
- deluge.ui.console.colors.replace_tabs(line)¶
Returns a string with tabs replaced with spaces.
- deluge.ui.console.colors.strip_colors(line)¶
Returns a string with the color formatting removed.
deluge.ui.console.commander module¶
deluge.ui.console.eventlog module¶
- class deluge.ui.console.eventlog.EventLog¶
Bases: deluge.component.Component
Prints out certain events as they are received from the core.
- on_config_value_changed_event(key, value)¶
- on_new_version_available_event(version)¶
- on_plugin_disabled_event(name)¶
- on_plugin_enabled_event(name)¶
- on_session_paused_event()¶
- on_session_resumed_event()¶
- on_torrent_added_event(torrent_id, from_state)¶
- on_torrent_finished_event(torrent_id)¶
- on_torrent_removed_event(torrent_id)¶
- on_torrent_state_changed_event(torrent_id, state)¶
- write(s)¶
deluge.ui.console.main module¶
- class deluge.ui.console.main.BaseCommand¶
Bases: object
- aliases = []¶
- complete(text, *args)¶
- create_parser()¶
- epilog¶
- handle(*args, **options)¶
- interactive_only = False¶
- name¶
- option_list = ()¶
- split(text)¶
- usage = 'usage'¶
- class deluge.ui.console.main.Console¶
Bases: deluge.ui.ui._UI
- help = 'Starts the Deluge console interface'¶
- start()¶
- class deluge.ui.console.main.ConsoleUI(args=None, cmds=None, daemon=None)¶
Bases: deluge.component.Component
- get_torrent_name(torrent_id)¶
- match_torrent(string)¶
Returns a list of torrent_id matches for the string. It will search both torrent_ids and torrent names, but will only return torrent_ids.
Parameters: string – str, the string to match on Returns: list of matching torrent_ids. Will return an empty list if no matches are found.
- on_client_disconnect()¶
- run(stdscr)¶
This method is called by the curses.wrapper to start the mainloop and screen.
Parameters: stdscr – curses screen passed in from curses.wrapper
- set_batch_write(batch)¶
- set_mode(mode)¶
- start()¶
- tab_complete_path(line, type='file', ext='', sort='name', dirs_first=True)¶
- tab_complete_torrent(line)¶
- write(s)¶
- write_event(s)¶
- class deluge.ui.console.main.DelugeHelpFormatter(indent_increment=2, max_help_position=24, width=None, short_first=1)¶
Bases: optparse.IndentedHelpFormatter
Format help in a way suited to deluge Legacy mode - colors, format, indentation...
- format_option(option)¶
- format_usage(usage)¶
- replace_dict = {'(?<![\\-a-z])(-[a-zA-Z0-9])': '{!red!}%s{!input!}', '<tab>': '{!white!}%s{!input!}', '\\s\\*\\s': '{!blue!}%s{!input!}', '<state>': '{!yellow!}%s{!input!}', '[_A-Z]{3,}': '{!cyan!}%s{!input!}', '(\\[|\\])': '{!info!}%s{!input!}', '<download-folder>': '{!yellow!}%s{!input!}', '<torrent-id>': '{!green!}%s{!input!}', '\\.\\.\\.': '{!yellow!}%s{!input!}', '--[_\\-a-zA-Z0-9]+': '{!green!}%s{!input!}', '<torrent-file>': '{!green!}%s{!input!}'}¶
- class deluge.ui.console.main.OptionParser(**kwargs)¶
Bases: optparse.OptionParser
subclass from optparse.OptionParser so exit() won’t exit.
- error(msg : string)¶
Print a usage message incorporating ‘msg’ to stderr and exit. If you override this in a subclass, it should not return – it should either exit or raise an exception.
- exit(status=0, msg=None)¶
- format_option_help(formatter=None)¶
- print_help(file=None)¶
- print_usage(file=None)¶
- deluge.ui.console.main.load_commands(command_dir, exclude=[])¶
- deluge.ui.console.main.start()¶
deluge.ui.console.statusbars module¶
- class deluge.ui.console.statusbars.StatusBars¶
Bases: deluge.component.Component
- start()¶
- update()¶
- update_statusbars()¶