|
|
@ -155,10 +155,10 @@ class PublicRelations(Bureau):
|
|
|
|
tweet_mode="extended")
|
|
|
|
tweet_mode="extended")
|
|
|
|
out = ""
|
|
|
|
out = ""
|
|
|
|
for t in tweets:
|
|
|
|
for t in tweets:
|
|
|
|
prn.set(text_type="U")
|
|
|
|
prn.set(underline=1)
|
|
|
|
username = t["user"]["name"]
|
|
|
|
username = t["user"]["name"]
|
|
|
|
prn.textln(username)
|
|
|
|
prn.textln(username)
|
|
|
|
prn.set(text_type="NORMAL")
|
|
|
|
prn.set()
|
|
|
|
twtext = html.unescape(t["full_text"])
|
|
|
|
twtext = html.unescape(t["full_text"])
|
|
|
|
prn.block_text(twtext)
|
|
|
|
prn.block_text(twtext)
|
|
|
|
prn.ln()
|
|
|
|
prn.ln()
|
|
|
@ -194,10 +194,10 @@ class PublicRelations(Bureau):
|
|
|
|
tweet = self.t.t.statuses.show(id=tweet_id, tweet_mode="extended")
|
|
|
|
tweet = self.t.t.statuses.show(id=tweet_id, tweet_mode="extended")
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
|
|
|
|
|
|
|
|
prn.set(text_type="U")
|
|
|
|
prn.set(underline=1)
|
|
|
|
username = tweet["user"]["name"]
|
|
|
|
username = tweet["user"]["name"]
|
|
|
|
prn.textln(username)
|
|
|
|
prn.textln(username)
|
|
|
|
prn.set(text_type="NORMAL")
|
|
|
|
prn.set()
|
|
|
|
twtext = html.unescape(tweet["full_text"])
|
|
|
|
twtext = html.unescape(tweet["full_text"])
|
|
|
|
prn.block_text(twtext)
|
|
|
|
prn.block_text(twtext)
|
|
|
|
|
|
|
|
|
|
|
@ -306,10 +306,10 @@ class PublicRelations(Bureau):
|
|
|
|
toots = self.masto.timeline(limit=count)
|
|
|
|
toots = self.masto.timeline(limit=count)
|
|
|
|
out = ""
|
|
|
|
out = ""
|
|
|
|
for t in toots:
|
|
|
|
for t in toots:
|
|
|
|
prn.set(text_type="U")
|
|
|
|
prn.set(underline=1)
|
|
|
|
username = t.account.display_name
|
|
|
|
username = t.account.display_name
|
|
|
|
prn.textln(username)
|
|
|
|
prn.textln(username)
|
|
|
|
prn.set(text_type="NORMAL")
|
|
|
|
prn.set()
|
|
|
|
ttext = bleach.clean(t.content, tags=[], strip=True)
|
|
|
|
ttext = bleach.clean(t.content, tags=[], strip=True)
|
|
|
|
ttext = html.unescape(ttext)
|
|
|
|
ttext = html.unescape(ttext)
|
|
|
|
prn.block_text(ttext)
|
|
|
|
prn.block_text(ttext)
|
|
|
@ -337,9 +337,9 @@ class PublicRelations(Bureau):
|
|
|
|
|
|
|
|
|
|
|
|
notifications = self.masto.notifications(since_id=self.last_mast_notif)
|
|
|
|
notifications = self.masto.notifications(since_id=self.last_mast_notif)
|
|
|
|
if len(notifications) > 0:
|
|
|
|
if len(notifications) > 0:
|
|
|
|
prn.set(text_type="B")
|
|
|
|
prn.set(bold=True)
|
|
|
|
prn.textln("NOTIFICATIONS:")
|
|
|
|
prn.textln("NOTIFICATIONS:")
|
|
|
|
prn.set(text_type="NORMAL")
|
|
|
|
prn.set()
|
|
|
|
|
|
|
|
|
|
|
|
# store the last notification id
|
|
|
|
# store the last notification id
|
|
|
|
self.last_mast_notif = str(notifications[0].id)
|
|
|
|
self.last_mast_notif = str(notifications[0].id)
|
|
|
|