for line in thing.render(80):
print(line.ecma48())
+class MentionsUI(client.Client):
+ def run(self):
+ login.setup_client(self)
+ for item in reversed(self.get("notifications", limit=40)):
+ if item['type'] != 'mention':
+ continue
+ p = client.Status(item['status'])
+ for thing in p.text():
+ for line in thing.render(80):
+ print(line.ecma48())
+
class MyTestLoader(unittest.TestLoader):
def loadTestsFromModule(self, module):
suite = super().loadTestsFromModule(module)
parser.add_argument("--timeline", action="store_const", dest="action",
const=TimelineUI, help="Temporary mode to fetch "
"the user's timeline and print it on the terminal.")
+ parser.add_argument("--mentions", action="store_const", dest="action",
+ const=MentionsUI, help="Temporary mode to fetch "
+ "the user's mentions and print them on the terminal.")
parser.add_argument("--login", action="store_const", dest="action",
const=login.LoginUI, help="Log in to a user account.")
parser.set_defaults(action=cursesclient.CursesUI)