sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 08b5e6ab3a4de0ff30743fa9c348724c11c55b74
parent 1a26a00bcd96911f602d2d2ff6990934e45decb0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 18 Feb 2018 14:40:41 +0100

sfeed_update: use filename as feedname again

make the feedname sanitization less strict again.

Diffstat:
Msfeed_update | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sfeed_update b/sfeed_update @@ -67,13 +67,14 @@ convertencoding() { # feed(name, feedurl, [basesiteurl], [encoding]) feed() { (name="$1" - filename="$(printf '%s' "$1" | sed -E 's@[^a-zA-Z0-9]+@_@g')" + filename="$(printf '%s' "$1" | tr '/' '_')" feedurl="$2" basesiteurl="$3" tmpfeedfile="${sfeedtmpdir}/${filename}" tmpencfile="" encoding="$4" sfeedfile="${sfeedpath}/${filename}" + if [ ! "${encoding}" = "" ]; then fetchfeed "${feedurl}" "${name}" "${sfeedfile}" | \ convertencoding "${encoding}" "utf-8" @@ -82,8 +83,7 @@ feed() { fetchfeed "${feedurl}" "${name}" "${sfeedfile}" > "${tmpencfile}" detectenc=$(sfeed_xmlenc < "${tmpencfile}") convertencoding "${detectenc}" "utf-8" < "${tmpencfile}" - fi | sfeed "${basesiteurl}" | \ - awk -v "n=${name}" '{ print $0 " " n }' > "${tmpfeedfile}" + fi | sfeed "${basesiteurl}" > "${tmpfeedfile}" # get new data and merge with old. sfeedfilenew="${sfeedpath}/${filename}.new"