Skip to content

Instantly share code, notes, and snippets.

@jk
Last active July 25, 2019 11:49
Show Gist options
  • Save jk/3e2036a5cd968156229ba444a0214c33 to your computer and use it in GitHub Desktop.
Save jk/3e2036a5cd968156229ba444a0214c33 to your computer and use it in GitHub Desktop.
Get current temperatur from hamburger wettermast as text (instead of an image)
#!/bin/bash
curl -fsSL -o /tmp/temp.gif https://wettermast.uni-hamburg.de/plots/TT002_TND.gif \
&& tesseract /tmp/temp.gif /tmp/out -l eng 2&>1 /dev/null \
&& cat /tmp/out.txt \
| grep -h -P '\d+,\d' \
; rm -f out.txt temp.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment