Skip to content

Posts not public and cut off badly #37

Description

@mirabilos
--- 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions