sfeed

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

commit f23af0821309e86d9d6db59796d245b6986e2cd3
parent f6ad2583a768bfb1ddbc85a5a74e39d4167240ff
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  7 Aug 2015 20:46:42 +0200

sfeed_update: just use the feed name as the temporary filename

the base temporary directory is random. The directory is cleaned afterwards
or on SIGTERM etc so remove this unneeded line.

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

diff --git a/sfeed_update b/sfeed_update @@ -63,19 +63,18 @@ convertencoding() { # fetch and parse feed. # feed(name, feedurl, [basesiteurl], [encoding]) feed() { - (tmpfeedfile=$(mktemp -p "${sfeedtmpdir}") - name="$1" + (name="$1" + tmpfeedfile="${sfeedtmpdir}/${name}" tmpencfile="" encoding="$4" sfeedfile="${sfeeddir}/$1" if [ ! "${encoding}" = "" ]; then fetchfeed "$2" "$1" "${sfeedfile}" | convertencoding "${encoding}" "utf-8" else # detect encoding. - tmpencfile=$(mktemp -p "${sfeedtmpdir}") + tmpencfile="${tmpfeedfile}.enc" fetchfeed "$2" "$1" "${sfeedfile}" > "${tmpencfile}" detectenc=$(sfeed_xmlenc < "${tmpencfile}") convertencoding "${detectenc}" "utf-8" < "${tmpencfile}" - rm -f "${tmpencfile}" fi | sfeed "$3" > "${tmpfeedfile}" # get new data and merge with old.