Ircbot

From Fixme.ch
Revision as of 17:00, 20 July 2013 by Rorist (Talk | contribs) (Information)

Jump to: navigation, search

Information

Configuration and Installation

  • /home/irc-bot/.willie/default.cfg
  • Installation (latest version with better rss module)
cd /tmp; git clone git://github.com/embolalia/willie.git
cd willie; python setup.py install; rm -fr /tmp/willie
pip install feedparser pytz lxml pygeoip praw
apt-get install python-enchant
su -c 'willie -w' irc-bot
  • Patch rss to show the link of the article
--- /tmp/willie/willie/modules/rss.py   2013-07-20 17:43:43.570496043 +0200
+++ /usr/local/lib/python2.7/dist-packages/willie/modules/rss.py        2013-07-20 17:54:07.144679013 +0200
@@ -348,8 +348,8 @@
                 continue
 
         # print new entry
-        message = u"[\x02{0}\x02] \x02{1}\x02 {2}".format(
-            colour_text(feed_name, fg, bg), entry.title, entry.link)
+        message = u"[\x02{0}\x02] \x02{1}\x02 {2} {3}".format(
+            colour_text(feed_name, fg, bg, article_url), entry.title, entry.link)
         if entry.updated:
             message += " - " + entry.updated
         bot.msg(feed_channel, message)

Plugins

RSS

.rss add #channel name http://example.com/rss
.rss del name
.rss list
.startrss