From d910cf94204a44ca59953245eda596ae1a164268 Mon Sep 17 00:00:00 2001 From: Waweic Date: Wed, 25 Jul 2018 20:40:59 +0200 Subject: [PATCH] Added an option to reverse the timeline Added the (in my opinion) mission option to reverse the timeline by Adding a command and reversing the entries before they get printed out. --- toot/commands.py | 3 +++ toot/console.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/toot/commands.py b/toot/commands.py index c8d5149..80c4cf2 100644 --- a/toot/commands.py +++ b/toot/commands.py @@ -24,6 +24,9 @@ def timeline(app, user, args): else: items = api.timeline_home(app, user) + if args.reverse: + items = reversed(items) + print_timeline(items) diff --git a/toot/console.py b/toot/console.py index 62b1166..637a87a 100644 --- a/toot/console.py +++ b/toot/console.py @@ -156,6 +156,11 @@ READ_COMMANDS = [ "default": False, "help": "Show only statuses from local instance (public and tag timelines only).", }), + (["-r", "--reverse"], { + "action": "store_true", + "default": False, + "help": "Reverse the order of the shown timeline (to new posts at the bottom)", + }), ], require_auth=True, ),