def __init__(self): """ Creates a new instance of this class (used by termsaver script) From its base classes, the functionality provided here bases on the settings defined below: * clean up each cycle: True this will force the screen to be cleaned (cleared) before each new cycle is displayed * clean up each file: True this will force the screen to be cleaned (cleared) before each new file is displayed """ ScreenBase.__init__(self, "img2ascii", _("displays images in typing animation"), cli_opts={ 'opts': 'hicd:p:w:s:z:f:', 'long_opts': [ 'help', 'invert', 'path=', 'wide=', 'contrast', 'set=', 'framedelay=', 'scale=' ], }) self.delay = 0.002 self.frame_delay = 5 # self.path = path self.cleanup_per_cycle = False self.options = {'wide': 2} self.cleanup_per_cycle = True self.cleanup_per_file = True self.options = {}
def __init__(self, name, description, path=None, delay=None, cli_opts=None): """ Creates a new instance of this class. This constructor has two additional arguments, compared with its base class: * delay: defines the speed of the typing writer. See more details of this in `TypingHelperBase` class documentation. * path: defines the path from where this screen should scan for files """ ScreenBase.__init__(self, name, description, cli_opts) # define default cli options, if none are informed if not cli_opts: self.cli_opts = { 'opts': 'hd:p:', 'long_opts': ['help', 'delay=', 'path='], } self.delay = delay self.path = path self.ignore_binary = False self.cleanup_per_cycle = False self.colorize = False self.pygments_installed = False self.is_initalized = False
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__(self, "exampleplugin", _("the example plugin"), { 'opts': 'h', 'long_opts': ['help'] }) self.cleanup_per_cycle = True
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__(self, "clock", _("displays a digital clock on screen"), {'opts': 'hf', 'long_opts': ['help', 'format']}, ) self.cleanup_per_cycle = True
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__( self, "figlet-fly", _("displays flying text"), {"opts": "hw:d:f:", "long_opts": ["help", "word=", "delay=", "help-fonts", "font="]}, ) self.word = constants.App.TITLE self.delay = 0.05 self.cleanup_per_cycle = True
def __init__(self): """ Creates a new instance of this class. """ ScreenBase.__init__(self, "randtxt", _("displays word in random places on screen"), {'opts': 'hw:d:', 'long_opts': ['help', 'word=', 'delay=']}, ) self.word = constants.App.TITLE self.delay = 0.01 self.line_delay = 0 self.cleanup_per_cycle = True self.freeze_delay = self.FREEZE_WORD_DELAY
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__(self, "dot", _("displays a random running dot"), {'opts': 'hc:d:', 'long_opts': ['help', 'char=', 'delay=']}, ) self.char = "*" self.text = "" self.size = 1 self.delay = 0.05 self.cleanup_per_cycle = True
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__( self, "clock", _("displays a digital clock on screen"), { 'opts': 'hmb', 'long_opts': ['help', 'ampm', "big"] }, ) self.cleanup_per_cycle = True
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__(self, "matrix", _("displays a matrix movie alike screensaver"), {'opts': 'hkzd:g:', 'long_opts': ['kana', 'zenkaku', 'help', 'granularity=', 'delay=']}, ) self.cleanup_per_cycle = False # set defaults if self.line_delay is None: self.line_delay = 30 * constants.Settings.CHAR_DELAY_SECONDS
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__( self, "sysmon", _("displays a graphical system monitor"), {"opts": "hd:np:", "long_opts": ["help", "delay=", "no-adjust", "path="]}, ) self.delay = 0.5 # # Due to a time delay to calculate CPU usage # we need to clear the screen manually # self.cleanup_per_cycle = False
def help_fonts(self): fonts = self.get_fonts() ScreenBase.usage_header() print _("""Here is the list of all available figlet fonts that are supported in your system: %(fonts)s You may try to use them with the option -f/--font. See --help for details. You may also refer to official figlet documentation for additional details on how to deal with fonts. """) % { 'fonts': "\t" + "\n\t".join(textwrap.wrap(", ".join(fonts), 50)), } ScreenBase.usage_footer()
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__(self, "sysmon", _("displays a graphical system monitor"), {'opts': 'hd:np:', 'long_opts': ['help', 'delay=', 'no-adjust', 'path=']}, ) if self.delay is None: self.delay = 0.5 # # Due to a time delay to calculate CPU usage # we need to clear the screen manually # self.cleanup_per_cycle = False
def __init__(self): """ Creates a new instance of this class. """ ScreenBase.__init__( self, "randtxt", _("displays word in random places on screen"), { 'opts': 'hw:d:', 'long_opts': ['help', 'word=', 'delay='] }, ) self.word = constants.App.TITLE self.delay = 0.01 self.line_delay = 0 self.cleanup_per_cycle = True self.freeze_delay = self.FREEZE_WORD_DELAY
def __init__(self): """ The constructor of this class. """ ScreenBase.__init__( self, "matrix", _("displays a matrix movie alike screensaver"), { 'opts': 'hkzd:g:', 'long_opts': ['kana', 'zenkaku', 'help', 'granularity=', 'delay='] }, ) self.cleanup_per_cycle = False # set defaults if self.line_delay is None: self.line_delay = 30 * constants.Settings.CHAR_DELAY_SECONDS
def __init__(self, name, description, url=None, delay=None, cli_opts=None): """ Creates a new instance of this class. This constructor has two additional arguments, compared with its base class: * url: the URL address to fetch data from * `delay`: defines the delay for printing out characters of a string """ ScreenBase.__init__(self, name, description, cli_opts) if not cli_opts: self.cli_opts = { 'opts': 'hd:u:', 'long_opts': ['help', 'delay=', 'url='], } self.delay = delay self.url = url
def __init__(self, name, description, path=None, delay=None, cli_opts=None): """ Creates a new instance of this class. This constructor has two additional arguments, compared with its base class: * delay: defines the speed of the typing writer. See more details of this in `TypingHelperBase` class documentation. * path: defines the path from where this screen should scan for files """ ScreenBase.__init__(self, name, description, cli_opts) # define default cli options, if none are informed if not cli_opts: self.cli_opts = { 'opts': 'hd:p:', 'long_opts': ['help', 'delay=', 'path='], } self.delay = delay self.path = path self.cleanup_per_cycle = False