diff options
author | Manuel Graf <postmaster@grafoo.at> | 2021-01-10 23:06:29 +0100 |
---|---|---|
committer | Manuel Graf <postmaster@grafoo.at> | 2021-01-10 23:39:52 +0100 |
commit | 7cc673178f3c44d2509d823ea19171e2288308f9 (patch) | |
tree | 90d32b1c48f36c4955617615896eeff533bf947b /generate | |
download | transfeed-7cc673178f3c44d2509d823ea19171e2288308f9.tar.gz |
Initial commit
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" |