mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-19 02:46:06 -07:00
add templates folder and first template
This commit is contained in:
parent
c73e8a5e94
commit
0443d95bcc
18
resources/templates/miniflux.py
Normal file
18
resources/templates/miniflux.py
Normal file
@ -0,0 +1,18 @@
|
||||
# https://github.com/starr-dusT/dotfiles
|
||||
# Info: https://github.com/miniflux/python-client
|
||||
import miniflux
|
||||
|
||||
try:
|
||||
client = miniflux.Client("<miniflux url>", "<username>", "<password>")
|
||||
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"))
|
Loading…
x
Reference in New Issue
Block a user