From fa9ae8668e35055632281c347ed6ec9e699dea86 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 4 Dec 2020 12:01:23 +0100 Subject: [PATCH] try to fix formatting for masto-fedi prints --- screenless/bureau/publicrelations/publicrelations.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index ca493c3..22c679c 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -318,12 +318,14 @@ class PublicRelations(Bureau): out = "" for t in toots: prn.set(underline=1) - username = t.account.display_name + print("toot from:" + str(t.account)) + username = str(t.account.display_name) prn.textln(username) prn.set() ttext = bleach.clean(t.content, tags=[], strip=True) ttext = html.unescape(ttext) prn.block_text(ttext, font="0") + prn.ln() if len(t.media_attachments) > 0: img = None @@ -336,7 +338,7 @@ class PublicRelations(Bureau): im = PIL.Image.open(io.BytesIO(req_data.content)) if im.mode in ("L", "RGB", "P"): im = PIL.ImageOps.equalize(im) - im.thumbnail((self.smprint["width"], 576), PIL.Image.ANTIALIAS) + im.thumbnail((self.smprint["width"], 960), PIL.Image.ANTIALIAS) prn.image(im, impl="bitImageColumn") shortcode = self.short_tweet_id(str(t["id"]))