diff options
Diffstat (limited to 'generate')
-rwxr-xr-x | generate | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/generate b/generate new file mode 100755 index 0000000..0d5705d --- /dev/null +++ b/generate @@ -0,0 +1,15 @@ +#!/bin/sh +test $# -ne 1 && + { + echo "Usage: ${0} <xslt-stylesheet-file>" + exit 2 + } + +echo "$1" | grep 'derstandard.at/international/asien/hongkong' -q && url='https://www.derstandard.at/international/asien/hongkong' +# TODO: Add option to aggregate older articles using e.g. https://www.derstandard.at/international/asien/hongkong/2020/1/1 + +curl -sL -b cookies "$url" | + xmllint --html --xpath '//main' /dev/stdin 2>/dev/null | + xsltproc "$1" /dev/stdin | + xmllint --format /dev/stdin \ + >"$(dirname "$1")/feed.xml" |