|
|
@ -64,6 +64,7 @@ class Interface(cmd.Cmd): |
|
|
|
self._messages.extend(data) |
|
|
|
self._messages.extend(data) |
|
|
|
print '%d new messages, %d total messages now' % (len(data), |
|
|
|
print '%d new messages, %d total messages now' % (len(data), |
|
|
|
len(self._messages)) |
|
|
|
len(self._messages)) |
|
|
|
|
|
|
|
self._show_requests() |
|
|
|
|
|
|
|
|
|
|
|
def do_display(self, line=None): |
|
|
|
def do_display(self, line=None): |
|
|
|
"""Display the current message or move the cursor to the |
|
|
|
"""Display the current message or move the cursor to the |
|
|
@ -140,6 +141,7 @@ class Interface(cmd.Cmd): |
|
|
|
message = self._messages[self._cursor] |
|
|
|
message = self._messages[self._cursor] |
|
|
|
thread = console_utils.fetch_thread(message, self._connection) |
|
|
|
thread = console_utils.fetch_thread(message, self._connection) |
|
|
|
console_utils.print_thread(thread, self._connection) |
|
|
|
console_utils.print_thread(thread, self._connection) |
|
|
|
|
|
|
|
self._print_requests() |
|
|
|
|
|
|
|
|
|
|
|
def do_retweet(self, line): |
|
|
|
def do_retweet(self, line): |
|
|
|
"""Resends the original message to your followers.""" |
|
|
|
"""Resends the original message to your followers.""" |
|
|
@ -171,6 +173,19 @@ class Interface(cmd.Cmd): |
|
|
|
return False |
|
|
|
return False |
|
|
|
return True |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _show_requests(self): |
|
|
|
|
|
|
|
requests = self._connection.available_requests() |
|
|
|
|
|
|
|
available = [] |
|
|
|
|
|
|
|
for network in requests: |
|
|
|
|
|
|
|
if requests[network] >= 0: |
|
|
|
|
|
|
|
# just show information for networks that count that |
|
|
|
|
|
|
|
available.append('%d requests in %s' % ( |
|
|
|
|
|
|
|
requests[network], |
|
|
|
|
|
|
|
self._connection.name(network))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print 'You have %s' % (', '. join(available)) |
|
|
|
|
|
|
|
print |
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------- |
|
|
|
# ----------------------------------------------------------------------- |
|
|
|
# Methods required by the main Mitter code |
|
|
|
# Methods required by the main Mitter code |
|
|
|
# ----------------------------------------------------------------------- |
|
|
|
# ----------------------------------------------------------------------- |
|
|
|