Sunday, May 25, 2008

Shutup Jaiku

In my last post I bitched about the Jaiku IM gateway and how it was too chatty and all I wanted to do was post to Jaiku but not hear all the feed noise in my chat windows. Well a quick poke around and I found it was close to trivial to write a jabber robot. I used PyGtalkRobot which uses xmmppy (needed to install this from source) and pydns (the one from apt-get was fine for me).

Within an hour I had something working but it needed the Jaiku API key, not your Jaiku password. Some more hacking and I had a code snippet that given a Jaiku username and password would find the Jaiku API key. Since I'd found some useful snippets on snippets.dzone.com I uploaded my own useful snippet.

Meanwhile a helpful person suggested the ping.fm or imified bots but I couldn't work out what they did or didn't have a beta invite so I just kept plugging away at my thing. A little bit more time of cleanup and adding options and some minimal documentation and it was all good to go.

Normally I usually just release this stuff and let you run it. But this time I've decided to run it as a service and see how it goes. However beware! you'll be giving me your Jaiku user name and password. You really shouldn't do that, but you can trust me.

So just add shutupjaiku@wtwf.com as a talk contact and send it the same sign in you would to jaiku@jaiku.com
sign in username password
and then start sending messages and they'll show up on your Jaiku page. That address is ONLY used for chat, do not send it mail no one will read it.
Obviously there's lots of ways this little server could go, right now it does what I need.

I was delighted how easy PyGtalkRobot and the Jaiku API made everything. I was little irked there wasn't a nice way to get a Jaiku API key from a user name and password and also a few things irked me about PyGtalkRobot. Spitting out lots of output without using the logging api. Sending lines longer than 80 chars. And the crazy way you specify handlers, using the doc string to contain the regex that triggers the handler is just bizarre! Why not just register handlers like Python Httpd servers do?

If you'd like to download the source and run your own copy go for it! Hope you find it useful.

Saturday, May 24, 2008

Jaiku

I've been playing around with Jaiku, Google's purchased Twitter clone/competitor. I also played with Twitter at the same time (actually revived an account I made ages ago). Twitter sucks, it's way way too slow to even approach usability so I gave up on it. Jaiku is zippy fast which is likely a function of the number of users of each service, but perhaps one scales better than the other.

I've had a need for something that's not quite blogging, but blogging, I try to keep my posts down, so that when they do show up they might be somewhat interesting, But I also have random blabbering, thoughts observations I'd like to note and perhaps aggregate into a post at some point. micro-blogging seemed ideal for this. But I also didn't want a high barrier to entry so Jaiku's IM robot seemed like a good idea. You just IM them a message and it shows up in your jaiku account. Perfect for easy Jaiku-ing. However the robot has an annoying habit of sending you messages about what everyone else is doing. I guess that's the point, but I find it annoying. Especially in gmail where it flashes the title when you have an unread IM, from Jaiku.

Grouping together posting and reading in the same IM robot is like making my blogger post page also be my google reader. They should be two separate activities that I can merge if I like.

Looks like I'm going to have to learn a Jaiku API and how to write my own jabber robot (in python!). Perhaps I'll host in on Google App Engine (I wonder if you can for things like this?).

As an aside, getting the IM set up was a nightmare since my Google Apps domain wasn't exporting SRV DNS records for jabber. The DNS hosting (chosen by Google) was down for editing so I had to deal with their support department (ugh!). Here is the magic command to make sure you have it set up right (replace example.com with your domain name):
dig srv _xmpp-server._tcp.example.com

Car Audio

Old and Busted:New Warm-ness:My beloved old car stereo finally started acting up. The laser was becoming less and less aligned and skipping more and more. It was time to replace it. There were a few things that bothered me about the old one, mostly that it only displayed MP3 IDv1 tags and not the newer ones. But other than that it was pretty sweet. For the last few years though I've been coveting the next gen players that will play DVD-ROMs full of mp3's not just lame teeny tiny CD-ROMs.

This new player (JVC KD DV 7400) looked awesome, the extra $20 over lower models for a better display seemed worth it. But there's a few things that irk me about it.
  • It takes 30 seconds to read a disk and start playing
  • It re-reads the disk every time it powers up, and every time you switch between sources (press the volume button by mistake, which switches sources, and you're without music for 30 seconds).
  • The USB-iPod connector works awesome with iPods, just plug in with the regular iPod cable and it controls it. However, your iPod must be a newer model, i.e. one that plays video. My iPod Photo just locks up when I plug it in. It also doesn't work with 1st or 2nd gen iPhones either (but at least it lets them work and does charge the battery)
  • The USB disk reader is finicky, it won't read some parts of a disk If you defrag your disk it will play the first tracks, I've yet to find where the limit is. it won't play the whole of a 1G stick
  • The display isn't as good a it could be, the track name is teeny and hard to read. There's so much screen real estate and they could have used it better.
  • I get the impression random play is still random and not shuffle. At least I can choose between random in directory or over the whole disk.
However despite all that whining, I'm still happy with it and it's still an improvement on my old one, but there's still quite a bit they could do better with it. Now all I need to do is get some screens and I can play DVDs in the car!

Wednesday, May 07, 2008

Download Picasa Web Album

I recently needed to download some friend's Picasa Web Albums and did a quick search and didn't find anything readable or that worked. I had planned to use the fancy pants gData API but then saw that the solutions I found just used the RSS feed that each album has, this was much simpler to use.

download: downloadpicasawebalbum

Sadly you'll need ElementTree which is kinda easy to install, but still a pain, it's easy XML parsing though so it's what I use (even if it does screw everything up when you output stuff with namespaces in it).

Here's my use case. We all go to some event, friends start posting their album links, I download all the pictures, add it to iPhoto and then rate and upload my own album of pictures I like that I can then reference from my blogs etc. This way I don't have to worry about people removing pictures and me losing them (from my posts and just losing them in general).

This was the quickest piece of code I've knocked together and put on this site, took less than 2 hours.