Quinn Casey

Python

2021

OPML RSS/Miniflux feed to Markdown December 2021

In order to create my Blogroll automatically, I needed to convert the OPML export from Miniflux to markdown. While RSS-OPML-to-Markdown was a good start, I didn’t like the table output and the fact I couldn’t access htmlUrl data attributes. This python script outputs a tag-separated list of feeds, linked with that htmlUrl rather than the rss feed itself. Passing tags to –ignore will omit them from the output. pip3 install opml argparse python ./opml_to_markdown.py --opmlFile ~/Downloads/feeds\(2\).opml --markdownFile blogroll.md --ignore All Private Newsletter # # opml_to_markdown.py # import opml import argparse def opml_to_markdown(opml_file, ignore_tags): outline = opml.parse(opml_file) markdown = "" for tag in outline: if tag.text in ignore_tags: continue markdown += "\n## {}\n\n".format(tag.text) for feed in tag: markdown += "* [{}]({})\n".format(feed.title, feed.htmlUrl) return markdown if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--opmlFile', required=True) parser.add_argument('--markdownFile', nargs='?') parser.add_argument('--ignore', nargs='+') args = parser.parse_args() markdown = opml_to_markdown(args.opmlFile, args.ignore) if args.markdownFile: with open(args.markdownFile, 'wt', encoding="utf-8") as f: f.write(markdown) f.write("\n") else: print(markdown)

#python

2020




Ulauncher Extension hero image
Ulauncher Extension November 2020

A Ulauncher extension to view and control devices in your Home Assistant instance.

#homelab #home-assistant #python



Sunpower Solar report hacking hero image
Sunpower Solar report hacking August 2020

Python script for decoding Sunpower inverter packets and recording solar production, power consumption, and temperature in Home Assistant.

#homelab #python



Faster Kodi Integration updates hero image
Faster Kodi Integration updates May 2020

The Home Assistant Kodi Integration is nice, but as of writing it becomes slower the longer Home Assistant runs. This sucks, especially when automations (like turning on a power hungry receiver) don't run because of it.

#homelab #home-assistant #python

email

github

telegram
Bluesky Streamline Icon: https://streamlinehq.comBluesky
bluesky

discord
PGP:B670795930CF07B9DE5F8FD7020CCCFCB93DA9A5

© 2025 Quinn Casey - This site does not track.
Cooked up fresh daily. Last rendered Wed 14 May 2025 @ 21:25 UTC