feat: oprava formátování tootů týdne
This commit is contained in:
+3
-3
@@ -119,11 +119,11 @@ def build_toot(measures_data, tags, top_tooty, date_from, date_to, week_number):
|
|||||||
tip = TIPS[week_number % len(TIPS)]
|
tip = TIPS[week_number % len(TIPS)]
|
||||||
|
|
||||||
if top_tooty:
|
if top_tooty:
|
||||||
lines = "\n".join(
|
blocks = "\n\n".join(
|
||||||
f"\"{truncate(s['text'], 80).replace(chr(10), ' ')}\" od @{s['acct']} 🔁 {s['reblogs']} ⭐ {s['favourites']}"
|
f"👤 @{s['acct']}\n\"{truncate(s['text'], 80).replace(chr(10), ' ')}\"\n🔁 {s['reblogs']} ⭐ {s['favourites']}"
|
||||||
for s in top_tooty
|
for s in top_tooty
|
||||||
)
|
)
|
||||||
toot_tyden = f"🌟 Tooty týdne:\n{lines}\n\n"
|
toot_tyden = f"🌟 Tooty týdne:\n\n{blocks}\n\n"
|
||||||
else:
|
else:
|
||||||
toot_tyden = ""
|
toot_tyden = ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user