From 0443d95bcce6fe688a795b753bd39928687bcb4f Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Sat, 2 Dec 2023 17:21:37 -0800 Subject: [PATCH] add templates folder and first template --- resources/templates/miniflux.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 resources/templates/miniflux.py diff --git a/resources/templates/miniflux.py b/resources/templates/miniflux.py new file mode 100644 index 00000000..fb165cd6 --- /dev/null +++ b/resources/templates/miniflux.py @@ -0,0 +1,18 @@ +# https://github.com/starr-dusT/dotfiles +# Info: https://github.com/miniflux/python-client +import miniflux + +try: + client = miniflux.Client("", "", "") +except Exception as e: print(e) +print("client connected") + +# Example: Make substitution of feed url for Youtube feeds +feeds = client.get_feeds() +print(f"got {len(feeds)} feeds") +for feed in feeds: + id = feed['id'] + cat = feed['category']['title'] + if cat == "Youtube": + old_feed_url = feed['feed_url'] + client.update_feed(feed_id=id, feed_url=old_feed_url.replace("CustomYoutubeBridge","YoutubeBridge"))