add more weather locations
#6
(05-14-2021, 01:33 AM)Uturn Wrote: sorry stupid question: How would I add more weather locations to the weather script, for example my home town Zurich, Switzerland? Thanks!

Maybe a bit late, you can just create your own userscript:

Install dependency
Code:
sudo apk install ansiweather
Create the userscript:
Code:
nano ~/.config/sxmo/userscripts/weather.sh
With following content:

Code:
#!/bin/sh
#title="ansiweather"

# Edit to your town:
LOCATION=Qeshm

# This fetches the Weather info:
WEATHER="ansiweather -l $LOCATION -a false -d true | sed 's/-/\n-/g' | sed 's/^-//'"

# Open a new shell and execute the command
sxmo_terminal.sh -- bash -c "${WEATHER}; exec bash"


exit 0
make it executable:
 
Code:
sudo chmod +x ~/.config/sxmo/userscripts/weather.sh


Now you cen select from Scripts menu in sxmo Smile
  Reply


Messages In This Thread
add more weather locations - by Uturn - 05-14-2021, 01:33 AM
RE: add more weather locations - by discogribbs - 06-18-2021, 11:25 PM
RE: add more weather locations - by Uturn - 06-27-2021, 11:38 PM
RE: add more weather locations - by walter1950 - 06-20-2021, 07:31 AM
RE: add more weather locations - by Uturn - 06-20-2021, 11:31 PM
RE: add more weather locations - by Kevin Kofler - 02-01-2024, 09:38 PM
RE: add more weather locations - by magdesign - 02-01-2024, 05:25 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)