Using rssdrop to receive and read feeds in Mutt

rssdrop

rssdrop is a perl script to deliver feeds to Maildirs. The origin script is out of date and very buggy. So I create a fork and fixed lots of problems.

Install

The dependencies are perl-xml-simple, perl-date-manip and perl-lwp-protocol-https.

If you have solved the dependencies, clone my fork and rssdrop just works:

1
git clone https://github.com/petronny/rssdrop

If you are using Archlinux, just install the rssdrop package from AUR.

Getting start

Initialize rssdrop
1
$ rssdrop --mailfolder path/to/mailfolder
Subscribe to a new feed
1
$ rssdrop -a archlinux https://www.archlinux.org/feeds/news/
Fetch items in your new feed
1
$ rssdrop archlinux
Unsubscribe
1
$ rssdrop -d archlinux
Fetch all new items in all feeds
1
$ rssdrop

Mutt

This part is simple, you can navigate to your feeds maildir or add it to spoolfile in your .muttrc.

But almost all the feed contents are html files, mutt will show them in plain text as default.
It’s not quite human readable so you need a html2txt script to convert it.

html2txt

Refer to this blog, links is a good choice because of its numbered links feature. I changed it to elinks for Chinese supporting. Make sure it’s executable, and on your $PATH.

Here is an example of html2txt:

1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# for mutt to view html e-mails
elinks -dump "file://$@"
#or
#
#lynx -force_html -dump "$@"
#
#or
#
#w3m -T text/html -F -dump "$@"

You also need a ~/.mailcap:

1
2
# for mutt to view html e-mails
text/html;html2txt %s; copiousoutput

And configure the following options in your ~/.muttrc:

1
2
3
# for viewing html e-mails inside mutt. See also .mailcap
auto_view text/html
alternative_order text/enriched text/plain text text/html

Now you can read all the html mails in mutt, not only the feeds.