Introducing RSSDown

I’m an avid user of Markdown related tools. This blog is written in Markdown. My notes are in Markdown (using Obsidian). I often archive web pages as Markdown. The benefits are many: it’s plain text, easily searchable, easy to read on any kind of device, there’s great tooling out there, and it’s flexible enough to fit most needs.

It is for these reasons that I spent some time creating a tool, RSSDown, which takes an RSS or ATOM feed as input, and outputs Markdown. This makes it easy to read blog posts on the command line. It’s also able to persist the output as Markdown files, which can be useful for archiving or synchronization purposes.

The word “tool” is probably a bit generous here. It’s basically a combination of Flexmark, for Markdown conversion, and Rome, for feed parsing.

How to use it

Here’s a quick example which fetches the feed from Julia Evan’s blog (which I strongly recommend you read!). It creates a Markdown file per blog post, saves it in /tmp, and keeps track of which posts it has encountered in /tmp/seen. It also adds #unread at the bottom of every file, which makes it easy to keep track of what you’ve read in tools like Obsidian.

bin/rssdown \
    --tag unread \
    --seen /tmp/seen \
    --persistToDir /tmp \
    https://jvns.ca/atom.xml

There are couple of extra flags and toggles, which can be displayed with the -h flag:

bin/rssdown -h

usage: rssdown URL [URL2 [URL3] ...]
 -h,--help                  Prints this help message

 -p,--persistToDir <arg>    When present, output will be written to this directory. The directory is expected to exist!

 -s,--seenFile <arg>        When present, this file will be used to mark the items rssdown has already seen, and items in this file will be ignored on subsequent runs.

    --skipAddMissingTitle   When present, do NOT attempt to write missing titles at the start of an item's Markdown output.

    --skipFrontMatter       When present, do NOT write front matter before an item's Markdown output.

 -t,--tag <arg>             When present, the tag will be added at the bottom of the Markdown output, prepended with a #. This is useful for adding an #unread tag to new items. Multiple tags can be provided by repeating the option.

Where to get it

You can find the binaries and source code on my gitlab. It requires a recent Java version, but otherwise has no external dependencies. Enjoy. And if you find this useful, send some kudos to the authors of Flexmark and Rome!

— Elric