Sunday·08·March·2009
Sedating irssi’s nick highlight for microblogging messages //at 17:13 //by abe
My favourite IRC client is irssi. I like it so much that I even use it for all my instant messaging needs. The gateway of choice between irssi and mostly Jabber is Bitlbee.
I also microblog on identi.ca, a free (free as in AGPL) microblogging service based on laconi.ca. In comparsion to the non-free and proprietary Twitter microblogging, identi.ca has all the features which Twitter turned off already again.
For me the most important feature of Twitter was tweeting via XMPP (aka Jabber). Since Twitter turned off that feature, Twitter increasingly fast became unimportant for me. Identi.ca still has this feature and cultivates it further. So usually don’t visit the identi.ca website that often anymore but get the microblogging stream of my friends via XMPP and Bitlbee directly into my irssi.
Although this is very convenient, it has one big disadvantage: In comparison to an IRC channel, not only notices directed to me personally but every incoming notice beeps, because Bitlbee sends them either as /MSG or prepends my nick name. For normal IRC communication /MSG should beep, and you can’t make exceptions for that so easily in irssi.
I asked on #bitlbee (OFTC) and on #irssi (IRCNet). On #irssi funnily the first answer was “I tried that yesterday, no success” from Shrike. — So I’m not alone, although Shrike uses Jaiku and not identi.ca. Then I had the idea to get Bitlbee to not prepend my nick name for all those identi.ca notices which go into the &bitlbee channel — but I didn’t find a way to configure this in Bitlbee. But Shrike found a way to do this with already existing irssi plugins:
The trigger.pl plugin (available e.g. in Debian’s irssi-scripts package or on scripts.irssi.org) can add triggers which replace parts of the message. So the following three lines helped me to reduce the noise microblogging causes in my irssi:
/script load trigger /trigger add -publics -masks 'identica!update@identi.ca' -channels '&bitlbee' -regexp "^XTaran: " -replace '' /trigger save
And on the command line I just needed a symlink to automatically start the trigger plugin on irssi startup:
ln -vis /usr/share/irssi/scripts/trigger.pl ~/.irssi/scripts/autorun/
So now again only the important messages beep. :-)
Tagged as: #bitlbee, #irssi, AGPL, Bitlbee, deb, highlight, identi.ca, IM, IRC, IRCNet, irssi, Jabber, jaiku, laconi.ca, microblogging, OFTC, Perl, plugin, Shrike, trigger, Twitter, XMPP
2 comments // show without comments // write a comment
Related stories
How to make identi.ca talk //at 15:08 //by abe
The listeners of yesterday’s episode of Venty’s Hackerfunk radio show on Radio LoRa already know and heard it: We made identi.ca talk. And we did it with help of other microbloggers. (The podcast version of this Hackerfunk episode will be online in a few days, too. Will link it here and either Venty or me will post it on identi.ca, too, as soon as it’s published.)
A few weeks ago we thought about how we could “show” microblogging on the radio. With identi.ca’s Jabber (XMPP) interface we have real time access, and so the idea was born to pipe all incoming ‘dents into a speech synthesis system.
Then we tried to figure out which tools would be appropriate. Quite fast, people on identi.ca as well as on the LUGS IRC (e.g. bones0) pointed us to festival and espeak. We found no support for German in festival, so we went for espeak – although festival would have had the advantage of the existence of a festival plugin for the popular multiprotocol messenger Pidgin.
Next step was more difficult than expected: How to make a “tail -f” of XMPP incoming messages? Something like rsstail, just for XMPP. Although using the IM to IRC gateway Bitlbee (as I use it myself) and using “tail -f” (or better “inotail -f”) on the IRC client’s log file (ii comes to my mind for such purposes) would have been an option, nobody had the idea at that time.
And since @deepspawn conjured xmpptail in less than two hours we happily took it. xmpptail (tar.gz) is written in Python and uses Twisted Words (Debian package python-twisted-words) as XMPP libraries.
I had to patch xmpptail slightly for unbuffered I/O, Unicode support and for removing things we don’t want to hear on the radio as follows, but it worked more or less out of the box.
--- xmmptail.py 2009-02-25 20:47:48.000000000 +0100 +++ xmpptail.py 2009-03-07 18:48:57.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python -u # -*- coding: utf-8 -*- # author: Carlos A. Perilla# This file is part of Jance bot. @@ -65,7 +65,8 @@ body = unicode(e.__str__()) break - print("%s: %s" % (from_id,body)) +# print("%s: %s" % (from_id,body)) + print("%s" % (body.encode('utf-8'))) def authfailedEvent(xmlstream): @@ -80,9 +81,9 @@ dprint('Got something: %s -> %s' % (el.name, str(el.attributes))) if __name__ == '__main__': - print "Starting" + #print "Starting" execfile('tailconf') - print USER_HANDLE + #print USER_HANDLE me = USER_HANDLE + "/xmpptail" myJid = jid.JID(me) server = USER_HANDLE[USER_HANDLE.find('@')+1:]
So after configuring xmpptail to use the hackerfunk Jabber account, we successfully ran the following script during the radio show:
./xmpptail.py | while read LINE; do if [ "$LINE" = "empty" ]; then continue; fi; echo $LINE echo $LINE | tee -a xmpp-espeak.log | espeak --stdin -v de; done
At the end of the show, @rebugger found this howto which describes very detailed how to get festival working together with the non-free (“non-free” as in DFSG) MBROLA project which offers also the appropriate files for German. But because of how much work this would be to get it running, I currently prefer to stay with espeak for German speech synthesis .
Next step would be to use mnoGosearch’s mguesser to detect the language of a dent and run espeak (or whatever text-to-speech system is appropriate for the guessed language) with the appropiate options for that language, because otherwise many ‘dents sound really funny. ;-)
Update, 15:02: Venty gave the whole system the
name “Identibla”.
Tagged as: Bitlbee, bones0, deepspawn, DFSG, espeak, festival, Hackerfunk, identi.ca, identibla, ii, IM, inotail, IRC, Jabber, language detection, LoRa, MBROLA, mguesser, microblogging, mnoGosearch, non-free, Pidgin, pipe, Python, radio, rebugger, speech synthesis, tail, text to speech, tts, Twisted Words, Venty, XMPP, xmpptail
0 comments // show without comments // write a comment
Related stories
Musikalisches-Podcast-Stöckchen //at 04:28 //by abe
Ist schon heftig, da bekommt ein Stöckchen von einem Podcast, obwohl man gar kein Podcasts hört – nur halt ab und an in einer Radiosendung auftaucht, die’s auch als Podcast gibt.
Und vorallem, wie verlinkt man solche Stöckchen? Ich klau mal die ausformulierten Regeln mal hier, das war in der Kette (Ascari → TomInMuc → Podshots → Ventys Hackerfunk → Bones0 seinem Chabis Podcast → hierher) grade greifbar.
Also hier die Regeln: “Suche das sechste Lied im sechsten Ordner heraus. Alternativ darf es auch das sechste Lied der sechsten CD im Regal oder das sechste Lied der Playlist sein.”
Da Ordner bei mir je nach Lust und Laune eine unterschiedliche Sortierung haben können, ist der sechste Ordner witzlos. Da gespielte Songs bei Rythmbox aus der Playlist rausfliegen, hat sich der sechste Song seit ich angefangen habe, diesen Text zu schreiben, mehrmals geändert. Also zum CD-Regal. Da sind grade viele CDs zweckswegen Sicherheitskopien grade nicht drin. In der ersten Spalte ist das sechste Fach leer und wenn mal die Fächer von rechts nach links und dann erst die nächste Reihe zählt, dann kommt — nee, das will man nicht, das sind Jugendsünden. ;-) Also nehmen wir in der ersten Spalte einfach die sechste CD und dort den sechsten Track:
Royal Philharmonic Orchestra London — Yesterday
Also der Beatles-Klassiker “Yesterday” als Instrumental.
Wer den Song hören will, der sollte heute um 19 Uhr auf Radio LoRa den Hackerfunk einschalten. Venty wird den Track dort spielen. Aus dem Hackerfunk-Podcast wird der Song aufgrund der Halsabschneiderei der Musikindustrie leider rausgeschnippelt werden.
Achja, in der heutigen Folge des Hackerfunks wird es um Microblogging gehen. Und ich bin, wenn auch noch durch Erkältung etwas der Stimme beraubt, ebenfalls mit von der Partie.
Und wer ist als nächstes dran? Venty meinte vorhin auf #lugs so praktisch, daß Priska ja Stöckchenspezialistin sei, also geben wir das Stöckchen mal dorthin weiter. :-)
Now playing: Herbert Grönemeyer — Bleibt alles anders
Tagged as: bones0, CD, Chabis, Codo, Hackerfunk, Now playing, Other Blogs, Podcast, Stöckchen, Symlink-Artikel, Venty
1 comment // show without comments // write a comment