sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 58555779d123be68c0acf9ea898931d656ec6d63
parent f305b032bc19b4e81c0dd6c0398370028ea910ca
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 28 Feb 2021 13:33:21 +0100

sfeed_update: simplify, use feedurl directly

This also make it possible to use non-authoritive URLs as a baseurl, like
"magnet:" URLs.

Diffstat:
Msfeed_update | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/sfeed_update b/sfeed_update @@ -108,13 +108,8 @@ _feed() { fi rm -f "${tmpfeedfile}.fetch" - # if baseurl is empty then use the path from the feed by default. - if [ "${basesiteurl}" = "" ]; then - host="${feedurl##*://}" - basesiteurl="${feedurl%%://*}://${host%/*}/" - fi - - if ! parse "${name}" "${feedurl}" "${basesiteurl}" < "${tmpfeedfile}.utf8" > "${tmpfeedfile}.tsv"; then + # if baseurl is empty then use feedurl. + if ! parse "${name}" "${feedurl}" "${basesiteurl:-feedurl}" < "${tmpfeedfile}.utf8" > "${tmpfeedfile}.tsv"; then log "${name}" "FAIL (PARSE)" return fi