sfeed v0.7 ---------- Simple RSS and Atom parser (and scripts to add reader functionality). Dependencies ------------ - C compiler (required for sfeed.c). - POSIX shell (optional, used by sfeed_update). - perl (optional, used by sfeed_plain and sfeed_html). - curl (optional, used by sfeed_update, http://curl.haxx.se/). - iconv (optional, used by sfeed_update, http://www.gnu.org/software/libiconv/). Files ----- sfeed - Binary (from sfeed.c); read XML RSS or Atom feed data from stdin. Write feed data in a tab-separated format to stdout. You don't need the other scripts, they're just for convenience and show how you can use this program. sfeed_update - Shellscript; update feeds and merge with old feeds in the file $HOME/.sfeed/feeds by default. sfeed_plain - Perl script; format feeds file (TSV) from sfeed_update to plain text. sfeed_html - Perl script; format feeds file (TSV) from sfeed_update to HTML. sfeedrc.example - Example config file. Files read at runtime by sfeed_update ------------------------------------- sfeedrc - Config file. This file is evaluated as a shellscript in sfeed_update. You can for example override the fetchfeed() function to use wget, fetch or an other download program or you can override the merge() function to change the merge logic. The function feeds() is called to fetch the feeds. Files written at runtime by sfeed_update ---------------------------------------- feeds - Tab-separated format containing all feeds. The sfeed_update script merges new items with this file. feeds.new - Temporary file used by sfeed_update to merge items. TSV format ---------- The order and format of the fields are: item timestamp - string (YYYY-mm-dd HH:MM:SS [+-]HHMM) item title - string item link - string item description - string item id - string item author - string feed type - string (RSS or Atom) feed name - string (extra field added by sfeed_update) feed url - string (extra field added by sfeed_update) Usage ----- To build and install (respects DESTDIR and PREFIX variable): make install To update feeds and format the feeds file (configfile argument is optional): sfeed_update "configfile" sfeed_plain < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.txt sfeed_html < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.html Example script to view feeds with dmenu, opens selected url in $BROWSER: url=$(sfeed_plain < "$HOME/.sfeed/feeds" | dmenu -l 35 -i | sed 's@^.* \([a-zA-Z]*://\)\(.*\)$@\1\2@') [ ! "$url" = "" ] && $BROWSER "$url" or to view in your browser: $BROWSER "$HOME/.sfeed/feeds.html" or to view in your editor: $EDITOR "$HOME/.sfeed/feeds.txt" tip to remove feeds older than a certain date (change date="YYYYmmdd"), this doesn't take timezones into account so it's not 100% correct: gawk -F '\t' 'BEGIN { date=20110101 } { line=$0; gsub(/[^0-9]*/, "", $1); if (int(substr($1,0,8)) >= date) print line }' feeds > feeds.clean mv feeds.clean feeds License ------- MIT, see LICENSE file. Author ------ Hiltjo Posthuma