Add haikunator
This commit is contained in:
parent
38d0c1fbc3
commit
3a398a8416
@ -12,6 +12,8 @@ import irc.connection
|
||||
|
||||
import config
|
||||
|
||||
from haikunator import Haikunator
|
||||
|
||||
|
||||
class Ampache2IRC(irc.bot.SingleServerIRCBot):
|
||||
"""
|
||||
@ -39,11 +41,12 @@ class Ampache2IRC(irc.bot.SingleServerIRCBot):
|
||||
for entry in d.entries:
|
||||
if(self.last_seen is None or
|
||||
entry.published_parsed > self.last_seen):
|
||||
haikunator = Haikunator(entry.comments
|
||||
.replace(config.ampache_URL, "")
|
||||
.strip("/"))
|
||||
serv.privmsg(config.channel,
|
||||
"%s (%s)" % (entry.title,
|
||||
(entry.comments
|
||||
.replace(config.ampache_URL, "")
|
||||
.strip("/"))))
|
||||
haikunator.haikunate(token_length=0)))
|
||||
self.last_seen = entry.published_parsed
|
||||
|
||||
def on_welcome(self, serv, ev):
|
||||
|
@ -1,2 +1,3 @@
|
||||
feedparser==5.2.1
|
||||
irc==14.2.2
|
||||
haikunator
|
||||
|
Loading…
Reference in New Issue
Block a user