Sunday, October 10, 2010

3 minutes news and weather information is a script that helps me to save some time during the morning, I can enjoy my breakfast while this program serves me the morning news and the weather forecast.

The script basically does 3 things:
1.- Connects to Yahoo weather to parse the current weather conditions and the forecast.
2.- All that information is sent to festival, who is doing the text to speech conversion and output to the speakers. This helps me a lot in order to know if I can take the bike or not that day.
3.- Finally the scripts check the national spanish television for a 2 minutes news video, that downloads, trying to bypass some obfuscation. Then the video is played with the realtime weather information, an icon showing the weather and also the time.

A cron job is taking care of running it daily from Mon to Fri. Using a bash script that is doing something like:

pushd .
cd /home/user/weather
#lets clean the house first
find *.flv *.png -type f -mtime +3 -exec rm {} \;
popd .

The script can be found on my open source github repository:

No comments:


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.