From 5187d0ac208deb06eff3bafb7ffd2fc32286b46a Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 2 May 2022 22:25:19 +0200 Subject: ma rss: deploy ratt job --- makefu/2configs/deployment/rss/ratt-hourly.sh | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 makefu/2configs/deployment/rss/ratt-hourly.sh (limited to 'makefu/2configs/deployment/rss/ratt-hourly.sh') diff --git a/makefu/2configs/deployment/rss/ratt-hourly.sh b/makefu/2configs/deployment/rss/ratt-hourly.sh new file mode 100755 index 00000000..67f2529b --- /dev/null +++ b/makefu/2configs/deployment/rss/ratt-hourly.sh @@ -0,0 +1,28 @@ +#!/bin/sh +set -eu +URLS=${1?must provide URLS file} +OUTFILE=${2:-all.xml} + +echo "init, writing to $OUTFILE" + +cat > "$OUTFILE" < + + + makefu Ebay Kleinanzeigen + https://www.ebay-kleinanzeigen.de/ + Feed for all kleinanzeigen + $(date '+%a, %d %b %Y %H:%M:%S %z') +EOF +echo "looping through $URLS" +cat "$URLS" | while read line;do + echo "fetching $line" + ratt auto "$line" | \ + xmlstarlet sel -t -c "//item" >> "$OUTFILE" || : +done + +echo "close" +cat >> "$OUTFILE" < + +EOF -- cgit v1.2.3