Closed s-l-teichmann closed 8 years ago
Für ./src/resources/fromGist/Downloadschritt-Atom.xml aus dem Repo sollte das in etwa wie folgt laufen (als Bash-Skript):
``#!/bin/bash
STEP="$1"
xmlstarlet sel -t -v "/DownloadSchritt/URL/text()" "$STEP"
DATASET=xmlstarlet sel -t -v "/DownloadSchritt/Dataset/text()" "$STEP"
WERT=xmlstarlet sel -t -v "/DownloadSchritt/Parameters/Parameter[Name/text()='VARIATION']/Wert/text()" "$STEP"
echo "Dataset: $DATASET" echo "Wert: $WERT"
i=0
curl "$DATASET" | \
xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -v "//atom:entry[atom:id/text()='"$WERT"']/atom:link/@href" - | sed 's/&/&/g' - | while read ext; do
dst=printf "%03d.tiff" $i
echo $dst
curl $ext > $dst
i=$((i+1))
done
They are implemenent now.
The datasets referenced by ATOM feeds must be downloadable.