[pybot-commits] CVS: pybot/pybot/modules rss.py,1.1,1.2
Brought to you by:
niemeyer
From: Gustavo N. <nie...@us...> - 2003-08-26 04:02:29
|
Update of /cvsroot/pybot/pybot/pybot/modules In directory sc8-pr-cvs1:/tmp/cvs-serv16201/pybot/modules Modified Files: rss.py Log Message: Minor tweaks. Index: rss.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/rss.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rss.py 25 Aug 2003 18:54:54 -0000 1.1 --- rss.py 25 Aug 2003 19:27:39 -0000 1.2 *************** *** 24,28 **** HELP = """ You can ask me to show RSS news from any site and for any user/channel ! and server with "[dont] show (news|rss news) [from] <url> [with link[s]] [with desc[ription][s]] [with prefix "<prefix>"] [each <n>(m|h)] [(on|for) (user|channel) <target>] [(on|at) server <server>]". Notice --- 24,28 ---- HELP = """ You can ask me to show RSS news from any site and for any user/channel ! and server with "[dont] show (rss|news) [from] <url> [with link[s]] [with desc[ription][s]] [with prefix "<prefix>"] [each <n>(m|h)] [(on|for) (user|channel) <target>] [(on|at) server <server>]". Notice *************** *** 86,92 **** mm.hooktimer(60, self.update, ()) ! # [dont] show (news|rss news) [from] <url> [with link[s]] [with desc[ription][s]] [with prefix "<prefix>"] [each <n>(m|h)] [[on|at|in|for] (user|channel) <target>] [[on|at|in|for] server <server>] self.re1 = regexp(refrag.dont(optional=1), ! r"show (?:rss news |news )(?:from )?(?P<url>(?:https?|ftp)\S+)" r"(?:" r" with prefix \"(?P<prefix>.*?)\"|" --- 86,92 ---- mm.hooktimer(60, self.update, ()) ! # [dont] show (rss|news|rss news) [from] <url> [with link[s]] [with desc[ription][s]] [with prefix "<prefix>"] [each <n>(m|h)] [[on|at|in|for] (user|channel) <target>] [[on|at|in|for] server <server>] self.re1 = regexp(refrag.dont(optional=1), ! r"show (?:rss |news |rss news )(?:from )?(?P<url>(?:https?|ftp)\S+)" r"(?:" r" with prefix \"(?P<prefix>.*?)\"|" *************** *** 219,229 **** cursor.execute("insert into rssfeed values (NULL, %s, 0)", (url,)) try: cursor.execute("insert into rsstarget values " ! "(NULL," ! " (select id from rssfeed where url=%s)," ! " %s, %s, %s, %s, %s, -1)", ! (url, servername, target, flags, ! prefix, interval)) except db.error: msg.answer("%:", ["Not needed", "It's not needed", --- 219,233 ---- cursor.execute("insert into rssfeed values (NULL, %s, 0)", (url,)) + cursor.execute("select id from rssfeed where url=%s", + (url,)) + feedid = cursor.fetchone().id try: cursor.execute("insert into rsstarget values " ! "(NULL, %s, %s, %s, %s, %s, %s, " ! " (select max(id) from rssitem where " ! " feedid=%s)" ! ")", ! (feedid, servername, target, flags, ! prefix, interval, feedid)) except db.error: msg.answer("%:", ["Not needed", "It's not needed", |