-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
--- a/feediverse.py
+++ b/feediverse.py
@@ -54,7 +55,11 @@ def main():
if args.dry_run:
print("trial run, not tooting ", entry["title"][:50])
continue
- masto.status_post(feed['template'].format(**entry)[:499])
+ postbody = feed['template'].format(**entry)
+ if len(postbody) > 499:
+ postfix = "…\n\n(more…)"
+ postbody = postbody[:(499 - len(postfix))] + postfix
+ masto.status_post(postbody, visibility='public')
if not args.dry_run:
config['updated'] = newest_post.isoformat()
I was first considering making the length configurable, but posting a longer entry leads to people having to click a button first in Pinafore, for example. So add an indicator that it’s cut off.
Also, set the post visibility — this should probably be a config item, ideally one that can be set globally but overridden per feed.
Metadata
Metadata
Assignees
Labels
No labels