Jun 4
Geek

While still trying to forget I am sick, I hacked up a perl script that would fetch an RSS feed, parse it and sms me the bits of it I want (usually just the title).

It works like a charm. I am using it to sms me entries from the Internet Storm Centre feed. To do this I get cron to execute the following every hour:

rss2sms.pl http://iscxml.sans.org/rssfeed.xml

Pretty straight forward, by twiddling the two config variables at the top you can make it execute an arbitrary program when a new item is detected. You can also twiddle which bits of the feed you want it to send, just look in the code. To do the sms'ing I am just plugging in my commandline sms script.

The rss2sms script is available here. It probably should be named something more accurate, like rss2text_and_run_an_arbitrary_command_when_a_new_item_is_detected, but it just doesn't have the same ring to it.

I fully realise there are numerous better ways to do this, and would appreciate anyone willing to implement one.

UPDATE: Whoops, I wasn't overwriting the item with new ones. That's fixed now.

Posted by Dominic White

Last modified on 2006-06-06 14:21

0 Trackbacks

  1. No Trackbacks

3 Comments

Display comments as(Linear | Threaded)
  1. khumbulani mphofu says:

    crap, this only works for Unix/Linux. anything similar for windows?

  2. Dominic White says:

    It works in Windows, you just need ActiveState Perl for windows.

  3. me says:

    so i am guessing that this is written in perl?

Add Comment


E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA