5
__copyright__ = 'this file is in the public domain'
7
first check if you have RSS permission
8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12
<gozerbot> you have permissions = USER .. OPER
14
if this is not the case add it
15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
<dunk> !setperms dunk rss
21
see which rss commands the bot has with
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
<gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5)
27
rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8)
28
rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12)
29
rss-scan 13) rss-watch 14) rss-running 15) rss-get 16)
32
you will want to add a url to the RSS system, we use slashdot as an example
33
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
<dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot
44
<gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7
45
Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless
46
Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic
47
Director to Make Battle Angel Movie 8) Malware: Fighting Malicious
48
Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI
51
to let the bot check for updates
52
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
<dunk> !rss-watch slash
56
<gozerbot> watcher thread started
58
see if the thread is running
59
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
<gozerbot> 1) slash ['#dunkbots']
65
if you want to stop watching
66
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
<dunk> !rss-stopwatch slash
72
see what other data the rss feed has to offer
73
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
<dunk> !rss-scan slash
77
<gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20
78
comments = 20 topic = 20 time = 20 department = 20 image = 20
81
this counts the number of times a certain tag is found in the feed.
83
so if we also want for example the link field added
84
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
you can add that item to the itemslist::
87
<dunk> !rss-additemslist slash link
93
<gozerbot> 1) Cracking the Google Code... Under the GoogleScope -
94
http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway
95
Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3)
96
More on Last Years Cisco Source Code Theft -
97
http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a
98
Spreading Worm Look Like? -
99
http://slashdot.org/article.pl?sid=05/05/10/1333202 (+2)
101
to remove use rss-delitemslist.
106
the bot will default poll once every 30 min. if you want the bot to poll
107
every x seconds you can use the rss-setsleeptime command (min is 60 seconds).