Ejemplo n.º 1
0
 def __init__ (self, id, status):
     self.regex_retweet = re.compile('^RT @\w+:')
     self.conf = tyrs.get_conf()
     self.api = tyrs.get_api()
     self.set_date()
     self.buffer = tyrs.get_interface().buffer
     self.is_retweet(status)
     self.id = id
     self.status = status
     status_content = urwid.Padding(
         urwid.AttrWrap(urwid.Text(self.get_text(status)), 'body'), left=1, right=1)
     widget = urwid.AttrWrap(TitleLineBox(status_content, title=self.get_header(status)), 'line', 'focus')
     self.__super.__init__(widget)
Ejemplo n.º 2
0
 def __init__(self):
     self.api        = tyrs.get_api()
     self.conf       = tyrs.get_conf()
     self.timelines  = tyrs.get_timelines()
     self.buffers    = tyrs.get_buffers()
     self.completion = tyrs.get_completion()
     self.help = False
     tyrs.set_interface(self)
     self.update_last_read_home()
     self.api.set_interface()
     self.regex_retweet     = re.compile('^RT @\w+:')
     self.stoped = False
     self.buffer           = 'home'
     self.first_update()
     self.main_loop()
Ejemplo n.º 3
0
Archivo: help.py Proyecto: dialelo/tyrs
def help_bar():
    conf = tyrs.get_conf()
    if conf.params["help"]:
        return urwid.AttrWrap(
            urwid.Columns(
                [
                    urwid.Text(["help:", ("help_key", " ? ")]),
                    urwid.Text(["up:", ("help_key", " %s " % conf.keys["up"])]),
                    urwid.Text(["down:", ("help_key", " %s " % conf.keys["down"])]),
                    urwid.Text(["tweet:", ("help_key", " %s " % conf.keys["tweet"])]),
                    ("fixed", 12, urwid.Text(["retweet:", ("help_key", " %s " % conf.keys["retweet"])])),
                    urwid.Text(["reply:", ("help_key", " %s " % conf.keys["reply"])]),
                    urwid.Text(["quit:", ("help_key", " %s " % conf.keys["quit"])]),
                ]
            ),
            "help_bar",
        )
    else:
        return None
Ejemplo n.º 4
0
Archivo: keys.py Proyecto: dialelo/tyrs
 def __init__(self):
     self.conf       = tyrs.get_conf()
     self.interface  = tyrs.get_interface()
     self.api        = tyrs.get_api()
Ejemplo n.º 5
0
 def __init__(self):
     self.interface = tyrs.get_interface()
     self.conf = tyrs.get_conf()
     self.api = tyrs.get_api()
     threading.Thread.__init__(self, target=self.run)
     self._stopevent = threading.Event()
Ejemplo n.º 6
0
 def __init__(self):
     self.conf = tyrs.get_conf()
     self.timelines = tyrs.get_timelines()
     self.search_user = None
     self.search_word = None
     self.flash_message = FlashMessage()
Ejemplo n.º 7
0
Archivo: help.py Proyecto: dialelo/tyrs
 def __init__(self):
     self.interface = tyrs.get_interface()
     self.conf = tyrs.get_conf()
     self.items = []
     w = urwid.AttrWrap(self.display_help_screen(), "body")
     self.__super.__init__(w)
Ejemplo n.º 8
0
 def __init__(self):
     self.conf = tyrs.get_conf()