add support for dc:date with sed's help

master v0.1.2
Shokara Kou 5 months ago
parent 68dd2c064d
commit 85cb78555b
  1. 20
  2. 2

@ -3,11 +3,6 @@ rssdl
Simple RSS/Atom feed downloader that saves items in a Maildir that can be read
with a MUA that supports Maildirs like (neo)mutt or aerc.
rssdl itself is licensed under the ISC license while yxml.{c,h} are under MIT
from Yoran Heling.
- C99 compatible compiler
@ -16,10 +11,17 @@ Dependencies
curl rss_url | ./rssdl maildir
./rssdl maildir <feed.rss
curl rss_url | rssdl maildir
rssdl maildir <feed.rss
For atom feeds, pipe the feed through atom_content.sed and then through rssdl.
curl atom_url | sed -f atom_content.sed | ./rssdl maildir
sed -f atom_content.sed feed.atom | ./rssdl maildir
curl atom_url | sed -f atom_content.sed rssdl maildir
sed -f atom_content.sed feed.atom | rssdl maildir
For certain feeds that use Dublin Core for specifying the published date, you
can use sed to change the timezone portion of the date to workaround strftime(3)
not recognizing colons in timezone offsets (%z).
curl rss_url | sed '/dc:date/s,:,,4' | rssdl maildir
sed '/dc:date/s,:,,4' feed.rss | rssdl maildir

@ -49,7 +49,7 @@ xmldata(XMLParser *x, const char *d, size_t dl)
strlcpy(item.title, d, sizeof(item.title));
else if (!isatom && istag("link"))
strlcpy(, d, sizeof(;
else if (istag("pubDate") || istag("updated"))
else if (istag("pubDate") || istag("updated") || istag("dc:date"))
strlcpy(, d, sizeof(;
else if (istag("summary") || istag("content") || istag("description"))
fputs(d, item.desc);