new weather script alltogether
This commit is contained in:
9
scripts/weather.py
Executable file
9
scripts/weather.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/python3
|
||||
|
||||
import requests
|
||||
import sys
|
||||
|
||||
req = requests.get(f'https://wttr.in/{sys.argv[1]}?format="%t:%c:%C"').text[1:-1].split(':')
|
||||
|
||||
print('{' + f'"text": "{req[0]} {req[1]}", "tooltip": "", "class": "{req[2]}"' + '}')
|
||||
|
1
scripts/weather_new.sh
Normal file
1
scripts/weather_new.sh
Normal file
@@ -0,0 +1 @@
|
||||
#!/bin/bash
|
Reference in New Issue
Block a user