summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-01-05 19:42:27 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-01-05 19:42:27 +0100
commita7fb510dd6f4801e8bf72fef350adcc3a07164b0 (patch)
treeb1260450ec71a54eb7479f0e4903d9badb2b6cdb /README
parent76cac881ede3d01086aba161779957fc14db1282 (diff)
improve README
Diffstat (limited to 'README')
-rw-r--r--README45
1 files changed, 25 insertions, 20 deletions
diff --git a/README b/README
index 353edca..7fd4f42 100644
--- a/README
+++ b/README
@@ -60,21 +60,21 @@ style.css - Example stylesheet to use with sfeed_html and sfeed_frames.
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.
- The function feed() can safely be executed as a parallel
- job in your sfeedrc config file to speedup updating.
+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. The function feed() can
+ safely be executed as a parallel job in your sfeedrc config file to
+ speed up updating.
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.
+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.
TAB-SEPARATED format
@@ -160,18 +160,23 @@ argument is optional):
sfeed_opml_export configfile > myfeeds.opml
-tip to remove feeds older than a date (change time="YYYY mm dd HH mm ss")
+tip to remove feeds older than a date, change mktime("YYYY mm dd HH mm ss"):
-gawk -F '\t' 'BEGIN {
- time = mktime("2012 01 01 12 34 56");
-}
-{
- if(int($1) >= int(time)) {
- print $0;
+ #!/bin/sh
+ set -x -e
+ gawk -F '\t' 'BEGIN {
+ time = mktime("2012 01 01 12 34 56");
}
-}' < feeds > feeds.clean
-
-mv feeds.clean feeds
+ {
+ if(int($1) >= int(time)) {
+ 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.clean feeds
License