Skip to content

Instantly share code, notes, and snippets.

@infernvs
infernvs / weather.sh
Last active September 15, 2021 22:16
Bash script to get the weather from Openweathermap.org
#!/bin/bash
APIID="GET API KEY"
temp() {
python -c 'import json; import sys; print json.load(sys.stdin)["main"]["temp"]'
}
humidity() {
python -c 'import json; import sys; print json.load(sys.stdin)["main"]["humidity"]'
}
wind() {
python -c 'import json; import sys; print json.load(sys.stdin)["wind"]["speed"]'