diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2013-05-20 20:06:26 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2013-05-20 20:06:26 +0200 |
commit | 0063a92c9f04b9b2d9ded8d05448bf2bf877bc57 (patch) | |
tree | b279de9f9172f8423aa68d335477479b58b2ec9a | |
parent | b9cd5fc07be60f69f3b03ec2707389672cb83ca6 (diff) |
add basesiteurl, simplify sfeed_update a bit
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r-- | sfeed_opml_import.c | 2 | ||||
-rwxr-xr-x | sfeed_update | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c index 2abc472..187d030 100644 --- a/sfeed_opml_import.c +++ b/sfeed_opml_import.c @@ -66,7 +66,7 @@ main(void) { "\n" "# list of feeds to fetch:\n" "feeds() {\n" - " # feed <name> <url> [encoding]\n", stdout); + " # feed <name> <feedurl> <basesiteurl> [encoding]\n", stdout); xmlparser_parse(&parser); fputs("}\n", stdout); return EXIT_SUCCESS; diff --git a/sfeed_update b/sfeed_update index de47ed9..46d934e 100755 --- a/sfeed_update +++ b/sfeed_update @@ -70,11 +70,11 @@ feed() { tmpfile=$(mktemp -p "$TMPDIR") (if [ "$4" = "" ]; then # don't use iconv if encoding not set in config. - fetchfeed "$2" "$1" | sfeed | addfield "$1 $2 $3" + fetchfeed "$2" "$1" else # use iconv to convert encoding to UTF-8. - fetchfeed "$2" "$1" | iconv -cs -f "$4" -t "utf-8" | sfeed | addfield "$1 $2 $3" - fi) > "$tmpfile" + fetchfeed "$2" "$1" | iconv -cs -f "$4" -t "utf-8" + fi) | sfeed | addfield "$1 $2 $3" > "$tmpfile" } terminated() { |