1 unstable release
Uses new Rust 2024
new 0.1.0 | Mar 11, 2025 |
---|
#397 in Command line utilities
54 downloads per month
23KB
413 lines
futter
futter
is a very minimal but powerful and flexible RSS/Atom feed reader.
In fact, it supports any feed format you like, as long as you can provide a parser for it.
futter
can even deal with non-feed sources, such as websites, by using simple shell scripts to generate feeds.
With barely 500 lines of Rust code, futter
is pretty much as simple as a feed reader can get.
To futter
, a feed is just a program that outputs a list of URLs.
This is what makes futter
so flexible.
You can use any program or shell command to generate and parse feeds.
Also, this means that futter
does not need to implement any feed parsing itself.
Actually, futter
is completely agnostic to the format of the feed.
The only things futter
does are
- Keep track of unread URLs
- Keep track of read URLs
- Run the feed programs to update the lists
- Open URLs in a browser (or anywhere else you like)
I wrote feed2urls
to extract a list of URLs from RSS and Atom feeds.
You can use it along with futter
to parse feeds.
Documentation
This README is the complete documentation for futter
.
Since futter
is so simple, there is no need for more documentation.
If anything is unclear, feel free to open an issue.
Config File
In order to use futter
, you need to create a config file at ~/.config/futter/config
.
An example config file might look like this:
# Blogs typically provide RSS or Atom feeds
feed lowtechmag curl https://solar.lowtechmagazine.com/posts/index.xml | feed2urls
# Youtube channels have RSS feeds
feed veritasium curl https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA | feed2urls
# You can also write custom scripts to generate feeds
feed custom my_script.sh
# Finally, you can use the `open-with` command to specify a custom command to open URLs
open-with firefox
Let's go through this example config file.
You can define feeds using the feed
command.
The feed command takes the form
feed <feed-name> <shell-command>
The command is executed as sh -c '<shell-command>'
to update the feed.
The output of the command should be a list of URLs, one per line.
So, the following line defines a feed called lowtechmag
that fetches the feed from the Low Tech Magazine website:
feed lowtechmag curl https://solar.lowtechmagazine.com/posts/index.xml | feed2urls
In this case, we use curl
to fetch the feed and feed2urls
to extract a list of URLs from the feed.
We can also define a custom
feed that uses a custom script to generate a list of URLs.
feed custom my_script.sh
Note that you can place scripts to be used by futter
in ~/.config/futter/scripts
.
This directory is added to the PATH
when running feed commands.
Finally, you can use the open-with
command to specify a custom command to open URLs.
For example, to open URLs in Firefox, you can use
open-with firefox
The command specified will be executed as sh -c '<command> <url>'
to open a URL.
If you do not specify an open-with
command, futter
will use xdg-open
.
Note that your feeds could output anything, not just URLs as long as the program specified to open-with
can make sense of the output.
Command Line Interface
For the complete list of commands and their usage, refer to the help message:
futter help
To get help for a specific command, run
futter help <command>
In the following, I will give a brief overview of the commands.
To update the feeds, run
futter update
To list the unread URLs, run
futter ls
To open a URL, run
futter open <entry>
where <entry>
is the index of the URL in the list of unread URLs.
You can also omit the index to open the first (oldest) URL in the list.
Or you can specify the name of a feed to open the first (oldest) URL in that feed.
To mark a URL as read, run
futter rm <entry>
where <entry>
is the same as for the open
command.
License
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org/>
Dependencies
~1.2–1.7MB
~32K SLoC