===
RSS
===

__copyright__ = 'this file is in the public domain'

first check if you have RSS permission
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !perms
    <gozerbot> you have permissions = USER .. OPER

if this is not the case add it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !setperms dunk rss
    <gozerbot> ok

see which rss commands the bot has with
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !apro rss
    <gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5)
               rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8)
               rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12)
               rss-scan 13) rss-watch 14) rss-running 15) rss-get 16)
               rss-additemslist

you will want to add a url to the RSS system, we use slashdot as an example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot
    <gozerbot> ok

see if the url works
~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-get slash
    <gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7
               Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless
               Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic
               Director to Make Battle Angel Movie 8) Malware: Fighting Malicious
               Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI
               Subpoenas

to let the bot check for updates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-watch slash
    <gozerbot> watcher thread started

see if the thread is running
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-running
    <gozerbot> 1) slash ['#dunkbots']

if you want to stop watching
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-stopwatch slash
    <gozerbot> ok

see what other data the rss feed has to offer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    <dunk> !rss-scan slash
    <gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20
               comments = 20 topic = 20 time = 20 department = 20 image = 20
               backslash = 1

this counts the number of times a certain tag is found in the feed.

so if we also want for example the link field added
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
you can add that item to the itemslist::

    <dunk> !rss-additemslist slash link
    <gozerbot> ok

check::

    <dunk> !rss-get slash
    <gozerbot> 1) Cracking the Google Code... Under the GoogleScope -
               http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway
               Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3)
               More on Last Years Cisco Source Code Theft -
               http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a
               Spreading Worm Look Like? -
               http://slashdot.org/article.pl?sid=05/05/10/1333202  (+2)

to remove use rss-delitemslist.

poll time
~~~~~~~~~

the bot will default poll once every 30 min. if you want the bot to poll
every x seconds you can use the rss-setsleeptime command (min is 60 seconds).
