maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Simple bash script for meteo.gr (GREEK only) (https://talk.maemo.org/showthread.php?t=90262)

andreas.k 2013-05-29 19:29

Simple bash script for meteo.gr (GREEK only)
 
1 Attachment(s)
Hello, long time lurker, this is my first contribution to our fantastic community. Here is a little script I put together.


What the script does:
a) tells you the date and time using e-speak
b) fetches the latest mp3 from http://penteli.meteo.gr/innoetics/XX.mp3
c) plays the latest mp3 with mpg123
d)finally it deletes the mp3


What the script requires:
a) internet connection to fetch the latest forecast mp3
b)espeak and mpg123

unfortunately the mp3s are only available in Greek and for most major cities

it is possible to select the city you want the forecast by editing the wget, mpg123 commmands and rm commands by doing the following:

1) visit meteo.gr
2)select your city
3)take note of the city id on the end of the url
e.g for IOANNINA the url is as follows
http://www.meteo.gr/cf.asp?city_id=31
If you are able to hear the forecast for your city then the script will work for you else you can try a nearby destination.
4) unzip the script
edit the script by changing the id of the city on the three lines with the comments (http://penteli.meteo.gr/innoetics/XX.mp3 replace xx with id )
5)make script executable chmod 700 weather.sh
6)execute the script ./weather.sh

koznj 2013-05-30 00:37

Re: Simple bash script for meteo.gr (GREEK only)
 
Γεια σου ρε Αντρέα! (ο:

xvan 2013-05-30 02:30

Re: Simple bash script for meteo.gr (GREEK only)
 
Code:

cat date.txt |espeak -g 5 -s 120
Is the same that
Code:

date | espeak -g 5 -s 120
AND you could use mplayer with cache...
Code:

wget -O - <url>| maplayer -cache <cache size> -
or
Code:

mplayer -cache <cache size> url
To not waste memory writes.


All times are GMT. The time now is 05:37.

vBulletin® Version 3.8.8