November 17, 2015
Read an RSS Feed Every Day
Have you seen our RSS-Service? It allows you to let your Karotz read an RSS-feed (for example the news).
A Dutch Karotz owner asked me how he could tell his rabbit to read the news headlines every day at 12.00pm. This is now possible using a Python script and our Karotz RSS Service.
This is what to do:
Step 1: choose a voice
First, you'll have to find a nice Acapela voice to read your daily news. Go to http://www.acapela-group.com, select a language and a voice, type some text and try out the voices. Write down the voice you like the most.
Step 2: find a news RSS URL
Second, you'll have to find the URL for your feed. If you're Dutch, try searching for "RSS nederlandse kranten" or something similar in Google. Not Dutch? Search for news feeds in your own language.
You'll find some sites that offer links (URLs) to news sites, or maybe you'll find links directly to RSS feeds. Try some of these URLs. When you see a page with just text (and sometimes "<?xml version="1.0" encoding="UTF-8"?>" on the first row), this is the URL you need. Copy this URL from your browsers address bar, so it will include "http://".
Step 3: download the script file
You've collected the information for creating a Python script file. Don't worry, you won't need any programming experience, we will create the script for you! Fill in the form below. Paste the RSS URL and enter your voice.
Press the "Generate Python script" button. This will generate a ZIP file to download.
Step 4: place the script file on your Karotz
In the ZIP, you'll find a file called "news.py". Use WinSCP to start an FTP session to your Karotz. Go to folder "/usr/www/cgi-bin" and upload "news.py" to this folder. After this, make a Telnet session to your Karotz, go to "/usr/www/cgi-bin" and enter the following command:
This command will make your script an executable script.
After this, enter command:
It can take up to 10-20 seconds, but if all went well, you'll hear the three news headlines spoken by your rabbit in the voice of your choice.
Step 5: schedule the news script
All okay? Now its time to schedule the news file to run every day at a specific time. Your Karotz is running a CRON service to run tasks at a specific time. The file with jobs is in "/usr/spool/cron/crontabs" and is called "root". Use WinSCP to go to this folder, right click on the file and choose "Edit".
You'll now see the cron file in the internal editor of WinSCP. It will look something like this:
This is a network check your rabbit is performing every 5 minutes. Add a new line below this line:
And save the file. Use Telnet again, goto /usr/spool/cron/crontabs. As a last check: enter command:
This will show you the content of your CRON file. It should look like this:
00 12 * * * /usr/www/cgi-bin/news.py
Step 6: enjoy!
Finished? Reboot your rabbit with command "reboot".
Now wait until its 12.00 in the afternoon. If everything succeeded, you'll hear the news headlines!
You can change the time you want to hear the news: first pair of digits are minutes, second pair of digits is the hour.
Hear the news in a strange voice, or with a French accent? Check our instructions how to update your tts.inc file.
Examples you may try: