def __call__(self, result, options): colour = self._colourMap.colourFor(result['from_user']) return ( u"%s%s%s%s %s" % (get_time_string(result, options, "%a, %d %b %Y %H:%M:%S +0000"), ansi.cmdColour(colour), result['from_user'], ansi.cmdReset(), result['text']))
def render_prompt(self, prompt): '''Parses the `prompt` string and returns the rendered version''' prompt = prompt.strip("'").replace("\\'","'") for colour in ansi.COLOURS_NAMED: if '[%s]' %(colour) in prompt: prompt = prompt.replace( '[%s]' %(colour), ansi.cmdColourNamed(colour)) prompt = prompt.replace('[R]', ansi.cmdReset()) return prompt
def render_prompt(self, prompt): '''Parses the `prompt` string and returns the rendered version''' prompt = prompt.strip("'").replace("\\'", "'") for colour in ansi.COLOURS_NAMED: if '[%s]' % (colour) in prompt: prompt = prompt.replace('[%s]' % (colour), ansi.cmdColourNamed(colour)) prompt = prompt.replace('[R]', ansi.cmdReset()) return prompt
def __call__(self, result, options): colour = self._colourMap.colourFor(result['from_user']) return (u"%s%s%s%s %s" %( get_time_string(result, options, "%a, %d %b %Y %H:%M:%S +0000"), ansi.cmdColour(colour), result['from_user'], ansi.cmdReset(), result['text']))
def __call__(self, status, options): colour = self._colourMap.colourFor(status['user']['screen_name']) return (u"%s%s%s%s %s" %( get_time_string(status, options), ansi.cmdColour(colour), status['user']['screen_name'], ansi.cmdReset(), status['text']))
def __call__(self, list): colour = self._colourMap.colourFor(list['name']) return (u"%s%-15s%s %s" %( ansi.cmdColour(colour), list['name'], ansi.cmdReset(), list['description']))
def __call__(self, list): colour = self._colourMap.colourFor(list['name']) return (u"%s%-15s%s %s" % (ansi.cmdColour(colour), list['name'], ansi.cmdReset(), list['description']))
def __call__(self, status, options): colour = self._colourMap.colourFor(status['user']['screen_name']) return ( u"%s%s%s%s %s" % (get_time_string(status, options), ansi.cmdColour(colour), status['user']['screen_name'], ansi.cmdReset(), status['text']))