|
|
|
@ -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"]))
|
|
|
|
|