mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Rename 'null2' to 'console'
This commit is contained in:
parent
3f3092cd8a
commit
10fdd76e3d
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.null2.colors import templates
|
from deluge.ui.console.colors import templates
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
import os
|
import os
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2.colors import templates, default_style as style
|
from deluge.ui.console.colors import templates, default_style as style
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
import re
|
import re
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand
|
from deluge.ui.console.main import BaseCommand
|
||||||
from deluge.ui.null2.colors import templates, default_style as style
|
from deluge.ui.console.colors import templates, default_style as style
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand
|
from deluge.ui.console.main import BaseCommand
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from deluge.ui.null2.colors import templates, default_style as style
|
from deluge.ui.console.colors import templates, default_style as style
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.null2.colors import templates
|
from deluge.ui.console.colors import templates
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2 import UI_PATH
|
from deluge.ui.console import UI_PATH
|
||||||
from deluge.ui.null2.main import BaseCommand, load_commands
|
from deluge.ui.console.main import BaseCommand, load_commands
|
||||||
from deluge.ui.null2.colors import templates
|
from deluge.ui.console.colors import templates
|
||||||
import os
|
import os
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.null2.colors import templates
|
from deluge.ui.console.colors import templates
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
import deluge.common as common
|
import deluge.common as common
|
||||||
from optparse import make_option
|
from optparse import make_option
|
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from deluge.ui.null2.colors import templates, default_style as style
|
from deluge.ui.console.colors import templates, default_style as style
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
"""Pause a torrent"""
|
"""Pause a torrent"""
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from deluge.ui.null2.main import BaseCommand
|
from deluge.ui.console.main import BaseCommand
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
"""Exit from the client."""
|
"""Exit from the client."""
|
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from deluge.ui.null2.colors import templates, default_style as style
|
from deluge.ui.console.colors import templates, default_style as style
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
"""Resume a torrent"""
|
"""Resume a torrent"""
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.null2.main import BaseCommand, match_torrents
|
from deluge.ui.console.main import BaseCommand, match_torrents
|
||||||
from deluge.ui.null2 import mapping
|
from deluge.ui.console import mapping
|
||||||
from deluge.ui.null2.colors import templates
|
from deluge.ui.console.colors import templates
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
import os
|
import os
|
@ -3,8 +3,8 @@ import logging
|
|||||||
logging.disable(logging.ERROR)
|
logging.disable(logging.ERROR)
|
||||||
import os, sys
|
import os, sys
|
||||||
import optparse
|
import optparse
|
||||||
from deluge.ui.null2 import UI_PATH
|
from deluge.ui.console import UI_PATH
|
||||||
from deluge.ui.null2.colors import Template, make_style, templates, default_style as style
|
from deluge.ui.console.colors import Template, make_style, templates, default_style as style
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
import shlex
|
import shlex
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ def match_torrents(array=None):
|
|||||||
|
|
||||||
def load_commands(command_dir, exclude=[]):
|
def load_commands(command_dir, exclude=[]):
|
||||||
def get_command(name):
|
def get_command(name):
|
||||||
return getattr(__import__('deluge.ui.null2.commands.%s' % name, {}, {}, ['Command']), 'Command')()
|
return getattr(__import__('deluge.ui.console.commands.%s' % name, {}, {}, ['Command']), 'Command')()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
commands = []
|
commands = []
|
||||||
@ -90,7 +90,7 @@ def load_commands(command_dir, exclude=[]):
|
|||||||
except OSError, e:
|
except OSError, e:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
class NullUI(object):
|
class ConsoleUI(object):
|
||||||
prompt = '>>> '
|
prompt = '>>> '
|
||||||
|
|
||||||
def __init__(self, args=None):
|
def __init__(self, args=None):
|
||||||
@ -203,7 +203,7 @@ class NullUI(object):
|
|||||||
run = cmdloop
|
run = cmdloop
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
ui = NullUI()
|
ui = ConsoleUI()
|
||||||
ui.precmd()
|
ui.precmd()
|
||||||
ui.onecmd(' '.join(sys.argv[1:]))
|
ui.onecmd(' '.join(sys.argv[1:]))
|
||||||
ui.postcmd()
|
ui.postcmd()
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
from deluge.ui.null2.main import match_torrents
|
from deluge.ui.console.main import match_torrents
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -68,7 +68,7 @@ class UI:
|
|||||||
log.info("Starting NullUI..")
|
log.info("Starting NullUI..")
|
||||||
from deluge.ui.null.deluge_shell import NullUI
|
from deluge.ui.null.deluge_shell import NullUI
|
||||||
ui = NullUI(args)
|
ui = NullUI(args)
|
||||||
elif selected_ui == "null2":
|
elif selected_ui == "console":
|
||||||
log.info("Starting NullUI2..")
|
log.info("Starting ConsoleUI..")
|
||||||
from deluge.ui.null2.main import NullUI
|
from deluge.ui.console.main import ConsoleUI
|
||||||
ui = NullUI(ui_args).run()
|
ui = ConsoleUI(ui_args).run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user