summaryrefslogtreecommitdiff
path: root/sfeed_update
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed_update')
-rwxr-xr-xsfeed_update8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfeed_update b/sfeed_update
index 52b9728..de47ed9 100755
--- a/sfeed_update
+++ b/sfeed_update
@@ -65,15 +65,15 @@ addfield() {
}
# fetch and parse feed.
-# feed(name, url, encoding)
+# feed(name, feedurl, basesiteurl, [encoding])
feed() {
tmpfile=$(mktemp -p "$TMPDIR")
- (if [ "$3" = "" ]; then
+ (if [ "$4" = "" ]; then
# don't use iconv if encoding not set in config.
- fetchfeed "$2" "$1" | sfeed | addfield "$1 $2"
+ fetchfeed "$2" "$1" | sfeed | addfield "$1 $2 $3"
else
# use iconv to convert encoding to UTF-8.
- fetchfeed "$2" "$1" | iconv -cs -f "$3" -t "utf-8" | sfeed | addfield "$1 $2"
+ fetchfeed "$2" "$1" | iconv -cs -f "$4" -t "utf-8" | sfeed | addfield "$1 $2 $3"
fi) > "$tmpfile"
}