diff --git a/ampache2irc.py b/ampache2irc.py index 2a0ab9c..51dfb09 100755 --- a/ampache2irc.py +++ b/ampache2irc.py @@ -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): diff --git a/requirements.txt b/requirements.txt index afbeee4..068a83b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ feedparser==5.2.1 irc==14.2.2 +haikunator