Skip to content

Commit

Permalink
Create wetter.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sumkincpp authored Jan 15, 2023
1 parent 2f5687d commit dc7172b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions misc/wetter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# curl https://www.ard-text.de/mobil/171 | grep -zPo "<p>(.|\n)*</p>" > wetter-`date +%F-%H-%M`.txt
# cat page.html | grep -zPo "<div class='std'>(.|\n)*?</div>" | xmllint --xpath '//p/text()' - | xargs echo | sed 's/\. /\.\n/g'

curl -sS https://www.ard-text.de/mobil/171 | \
grep -zPo "<div class='std'>(.|\n)*?</div>" | \
xmllint --xpath '//text()' - | \
xargs echo | \
sed 's/\. /\.\n/g' | \
tee wetter-`date +%F-%H-%M`.txt

0 comments on commit dc7172b

Please sign in to comment.