Created
August 1, 2014 20:45
-
-
Save HairyFotr/504314ada36d9dda6f7f to your computer and use it in GitHub Desktop.
readWeather
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#usage: readWeather [IMAGE URL or FILE] | |
#example: readWeather http://www.eurometeo.com/english/meteomed/img_014M | |
#dependencies: wget, imagemagick, tesseract-ocr | |
pic="$(mktemp)" | |
if [[ "$1" == http:* ]] || [[ "$1" == https:* ]]; then wget -q -O "$pic" "$1"; else cp "$1" "$pic"; fi | |
convert "$pic" -scale 252%x266% -fill grey61 -fuzz 39% -floodfill 75%x75% grey10 -fuzz 53% -trim -brightness-contrast 0x-10 -fill gray4 -adaptive-sharpen 1x0.73 -swirl 0.52 -swirl 0.11 -solarize 14% -white-threshold 75% -negate "$pic" && | |
tesseract "$pic" stdout | |
rm "$pic" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment