From f5734c0a40cbb2e9362b6f2d3efb4a0453bf2dbc Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 28 Jul 2015 21:35:09 +0200 Subject: update documentation... ... and add strlcat to compat.h --- README | 13 +++++-------- compat.h | 2 ++ sfeed_update.1 | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README b/README index 17b304d..ddcb443 100644 --- a/README +++ b/README @@ -124,14 +124,14 @@ output: To update feeds and format the feeds file (configfile argument is optional): sfeed_update "configfile" - sfeed_html < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.html - sfeed_plain < $HOME/.sfeed/feeds > $HOME/.sfeed/feeds.txt - + sfeed_html < $HOME/.sfeed/feeds/* > $HOME/.sfeed/feeds.html + sfeed_plain < $HOME/.sfeed/feeds/* > $HOME/.sfeed/feeds.txt + mkdir -p somedir && cd somedir && sfeed_frames $HOME/.sfeed/feeds/* Example script to view feeds with dmenu, opens selected url in $BROWSER: #!/bin/sh - url=$(sfeed_plain < "$HOME/.sfeed/feeds" | dmenu -l 35 -i | + url=$(sfeed_plain < $HOME/.sfeed/feeds/* | dmenu -l 35 -i | sed 's@^.* \([a-zA-Z]*://\)\(.*\)$@\1\2@') [ ! "$url" = "" ] && $BROWSER "$url" @@ -172,10 +172,7 @@ mktime("YYYY mm dd HH mm ss")): print $0; } }' < feeds > feeds.clean - - # compress old feeds file as archive. - gzip -c feeds > feeds_archive_`date +'%Y-%m-%d'`.gz - # move new file over old. + mv feeds feeds.old mv feeds.clean feeds diff --git a/compat.h b/compat.h index 4da3885..b154085 100644 --- a/compat.h +++ b/compat.h @@ -1,2 +1,4 @@ +#undef strlcat +size_t strlcat(char *, const char *, size_t); #undef strlcpy size_t strlcpy(char *, const char *, size_t); diff --git a/sfeed_update.1 b/sfeed_update.1 index 3632c5a..0a99a5d 100644 --- a/sfeed_update.1 +++ b/sfeed_update.1 @@ -54,7 +54,7 @@ sfeed_plain $HOME/.sfeed/feeds/* > $HOME/.sfeed/feeds.txt # HTML sfeed_html $HOME/.sfeed/feeds/* > $HOME/.sfeed/feeds.html # HTML with frames -mkdir somedir && cd somedir && sfeed_frames $HOME/.sfeed/feeds/* +mkdir -p somedir && cd somedir && sfeed_frames $HOME/.sfeed/feeds/* .Ed .Sh SEE ALSO .Xr sfeed 1 , -- cgit v1.2.3