From 3008b854f6ff30620f2aad99e49234f685cb792e Mon Sep 17 00:00:00 2001 From: Brad Ganley Date: Sun, 11 Feb 2024 14:12:59 -0600 Subject: [PATCH] Added ability to add tags to post --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index a02ac11..2419f39 100644 --- a/main.py +++ b/main.py @@ -10,6 +10,7 @@ MASTODON_INSTANCE_URL = os.environ['MASTODON_INSTANCE_URL'] TOOT_VISIBILITY = os.environ['TOOT_VISIBILITY'] # Toot visibility ('public', 'unlisted', 'private', or 'direct') # RSS feed URL RSS_FEED_URL = os.environ['RSS_FEED_URL'] +POST_TAGS = os.environ['POST_TAGS'] # File to store the processed entry URLs. Note that /state directory is for the docker setup PROCESSED_ENTRIES_FILE = '/state/processed_entries.txt' @@ -55,7 +56,7 @@ def check_and_post_new_items(): if entry_url not in processed_entries: print(f"Found a new RSS item: {entry.title}") # Create a Mastodon status - status = f"\n{entry.title}\n\n{entry.link}" + status = f"\n{entry.title}\n\n{entry.link}\n\n{POST_TAGS}" # Post the status to Mastodon mastodon.status_post(status, visibility=TOOT_VISIBILITY)