From efb41b5f147cea1f40d5e7895d68a9985603b315 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Thu, 15 Aug 2019 11:52:53 +0200 Subject: [PATCH] Add lot of extra prints to make things intelligible --- jan-pona-mute.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/jan-pona-mute.py b/jan-pona-mute.py index 7b7e115..0289747 100755 --- a/jan-pona-mute.py +++ b/jan-pona-mute.py @@ -330,16 +330,16 @@ post again.""" print("Index too high!") return + print() + print(self.header("%2d. %s %s") % (n, self.post.data()["created_at"], self.post.author())) print() self.show(self.post) + print() if(self.post.comments): - print() - if len(self.post.comments) == 1: - print("There is 1 comment.") - else: - print("There are %d comments." % len(self.post.comments)) + print("%d comment%s" % (len(self.post.comments), "s" if len(self.post.comments) != 1 else "")) print("Use the 'comments' command to list the latest comments.") + print("Use the 'comment' command to leave a comment.") def load(self, id): """Load the post belonging to the id (from a notification), @@ -405,8 +405,10 @@ show that many. The default is to load the last five.""" print(self.header("%2d. %s %s") % (n+1, comment.when(), comment.author())) print() self.show(comment) + print() else: print("There are no comments on the selected post.") + print("Use the 'comment' command to post a comment.") def do_comment(self, line): """Leave a comment on the current post. @@ -656,7 +658,10 @@ the user enabled those.""" print(self.header("%2d. %s %s") % (n+1, post.data()["created_at"], post.author())) print() self.show(post) + print() + print("%d comment%s" % (len(post.comments), "s" if len(post.comments) != 1 else "")) + print() print("Enter a number to select the post.") self.numbers_refer_to = 'home' else: -- 2.25.1