Rename 'null2' to 'console'

This commit is contained in:
Andrew Resch 2008-11-08 07:20:49 +00:00
parent 3f3092cd8a
commit 10fdd76e3d
17 changed files with 39 additions and 39 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.null2.colors import templates
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
from deluge.ui.console.colors import templates
from deluge.ui.client import aclient as client
from optparse import make_option
import os

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2.colors import templates, default_style as style
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console.colors import templates, default_style as style
from deluge.ui.client import aclient as client
from optparse import make_option
import re

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand
from deluge.ui.null2.colors import templates, default_style as style
from deluge.ui.console.main import BaseCommand
from deluge.ui.console.colors import templates, default_style as style
from deluge.ui.client import aclient as client
class Command(BaseCommand):

View File

@ -1,7 +1,7 @@
#!/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.null2.colors import templates, default_style as style
from deluge.ui.console.colors import templates, default_style as style
import logging
class Command(BaseCommand):

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.null2.colors import templates
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
from deluge.ui.console.colors import templates
from deluge.ui.client import aclient as client
class Command(BaseCommand):

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
from deluge.ui.null2 import UI_PATH
from deluge.ui.null2.main import BaseCommand, load_commands
from deluge.ui.null2.colors import templates
from deluge.ui.console import UI_PATH
from deluge.ui.console.main import BaseCommand, load_commands
from deluge.ui.console.colors import templates
import os
class Command(BaseCommand):

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.null2.colors import templates
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
from deluge.ui.console.colors import templates
from deluge.ui.client import aclient as client
import deluge.common as common
from optparse import make_option

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
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):
"""Pause a torrent"""

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
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):
"""Exit from the client."""

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
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):
"""Resume a torrent"""

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
from deluge.ui.null2.main import BaseCommand, match_torrents
from deluge.ui.null2 import mapping
from deluge.ui.null2.colors import templates
from deluge.ui.console.main import BaseCommand, match_torrents
from deluge.ui.console import mapping
from deluge.ui.console.colors import templates
from deluge.ui.client import aclient as client
from optparse import make_option
import os

View File

@ -3,8 +3,8 @@ import logging
logging.disable(logging.ERROR)
import os, sys
import optparse
from deluge.ui.null2 import UI_PATH
from deluge.ui.null2.colors import Template, make_style, templates, default_style as style
from deluge.ui.console import UI_PATH
from deluge.ui.console.colors import Template, make_style, templates, default_style as style
from deluge.ui.client import aclient as client
import shlex
@ -74,7 +74,7 @@ def match_torrents(array=None):
def load_commands(command_dir, exclude=[]):
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:
commands = []
@ -90,7 +90,7 @@ def load_commands(command_dir, exclude=[]):
except OSError, e:
return {}
class NullUI(object):
class ConsoleUI(object):
prompt = '>>> '
def __init__(self, args=None):
@ -203,7 +203,7 @@ class NullUI(object):
run = cmdloop
if __name__ == '__main__':
ui = NullUI()
ui = ConsoleUI()
ui.precmd()
ui.onecmd(' '.join(sys.argv[1:]))
ui.postcmd()

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
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 logging
@ -10,7 +10,7 @@ _mapping = {}
def _arg_is_id(arg):
return bool(_idregex.match(arg))
def get_names(torrents):
global names
names = []

View File

@ -68,7 +68,7 @@ class UI:
log.info("Starting NullUI..")
from deluge.ui.null.deluge_shell import NullUI
ui = NullUI(args)
elif selected_ui == "null2":
log.info("Starting NullUI2..")
from deluge.ui.null2.main import NullUI
ui = NullUI(ui_args).run()
elif selected_ui == "console":
log.info("Starting ConsoleUI..")
from deluge.ui.console.main import ConsoleUI
ui = ConsoleUI(ui_args).run()