From 66b15017d7a7b44b6293b473f172778e94837f28 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Sun, 18 Mar 2018 00:18:50 +0100 Subject: [PATCH] - like and retweet should work from detail view now --- screenless/bureau/publicrelations/publicrelations.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index 92992d1..bdd287c 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -156,7 +156,6 @@ class PublicRelations(Bureau): """ shortcode, _ = data.split(".") tweet_id = self.get_tweet_id(shortcode) - self.log.debug("tweet details for id:" + tweet_id) tweet = self.t.t.statuses.show(id=tweet_id) prn = printer.Usb(0x416, 0x5011, in_ep=0x81, out_ep=0x03) prn.codepage = "cp437" @@ -185,7 +184,9 @@ class PublicRelations(Bureau): prn.image(im, impl="bitImageColumn") tw_shortcode = self.short_tweet_id(tweet["id_str"]) + prn.textln("retweet") prn.barcode("PRtwrt." + tw_shortcode, "CODE128", function_type="B") + prn.textln("like") prn.barcode("PRtwlk." + tw_shortcode, "CODE128", function_type="B") prn.text("\r\n\r\n") @@ -198,7 +199,6 @@ class PublicRelations(Bureau): """ tweet_id = self.get_tweet_id(data) self.t.t.statuses.retweet(id=tweet_id) - return @add_command("twre", "Reply to Tweet") def tw_reply(self, data): @@ -216,7 +216,6 @@ class PublicRelations(Bureau): """ tweet_id = self.get_tweet_id(data) self.t.t.favorites.create(id=tweet_id) - return def main():