blob: 0d5705dc6f9fb388bbb47c9160ae62d81d33f034 (
plain) (
tree)
|
|
#!/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"
|