fix: use key file

This commit is contained in:
Fabio Lenherr / DashieTM 2023-01-04 17:26:38 +01:00
parent f60237e0c4
commit fb16eec496
3 changed files with 4 additions and 2 deletions

View file

@ -15,8 +15,8 @@ fi
# If you dunno, head to openweathermap.org, and make and account
#(completely free I swear, and then get your API Key and your City ID)
# I wish I was smart enough to do it like Elena, but this is the top I could do lol
KEY="{c4dcb6a002f5ce51f7e48c430ebe480d}"
ID="{3042030}"
KEY=$(cat $HOME/.ssh/weather-key)
ID=$(cat $HOME/.ssh/location)
UNIT="{metric}" #Options are 'metric' and 'imperial'
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT"")
echo $weather