Wednesday, June 25, 2008

Recent Hacks: irc2wiki.pl and xchat-nick-pidgin-status.py

The Mono a11y team has weekly iteration meetings in IRC, and we post the logs to the Mono wiki. Our version of MediaWiki doesn't automatically prettify IRC logs, so for awhile I was using Jamie Zawinski's irc2html.pl to create HTML tables. Today I hacked it up to produce MediaWiki tables instead. I call it irc2wiki.pl. Fixes welcome (or better suggestions).

Also, I now live on IRC. Some people prefer to get me through IM, so I always have Pidgin running, but my online presence is mostly reflected in my IRC nick. I'm forgetful, so I kept noticing that I was "available" in Pidgin even though my IRC nick was "sandy|lunch", or that when I changed my nick from "sandy|brb" to "sandy" my Pidgin status would stay the same. I decided to automate that shit. Based on a bunch of useful code from Arstechnica's Ryan Paul, I present to you my first xchat plugin, xchat-nick-pidgin-status.py:


#!/usr/bin/env python

# Sets Pidgin status from XChat nick, assuming you use a style like:
# mynick => Available (status "Workin")
# mynick|busy => Away (status "busy")
# Hobbled together by Sandy Armstrong from code
# written by Ryan Paul (segphault) of Ars Technica:
# http://arstechnica.com/reviews/apps/pidgin-2-0.ars/4
# http://arstechnica.com/journals/linux.ars/2007/08/29/send-twitter-updates-from-xchat-using-python

import xchat, dbus

# Describe the plug-in metadata for XChat
__module_name__ = "Pidgin Status Plug-in"
__module_version__ = "1.0"
__module_description__ = "Set Pidgin status according to XChat nick"

# Specify status ID values
STATUS_AVAILABLE = 2
STATUS_AWAY = 5


def nick(words, word_eol, userdata):
# Get new nick
if len(words) < 2:
return None
new_nick = words[1]

# Check for status
pipe_index = new_nick.find("|")
if pipe_index > 0 and pipe_index < len(new_nick):
message = new_nick[pipe_index + 1:]
# set away with status message
set_status("", STATUS_AWAY, message)
else:
# set available
set_status("", STATUS_AVAILABLE, "Workin")


def set_status(name, kind, message):
# Create a new saved status with the specified name and kind
status = purple.PurpleSavedstatusNew(name, kind)
# Associate the specified availability message with the new saved status
purple.PurpleSavedstatusSetMessage(status, message)
# Activate the new saved status
purple.PurpleSavedstatusActivate(status)


# Initiate a connection to the Session Bus
bus = dbus.SessionBus()

# Associate Pidgin's D-Bus interface with Python objects
obj = bus.get_object(
"im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")


# Associate the nick function with the /nick command in XChat
xchat.hook_command("nick", nick)

Tuesday, June 24, 2008

Tasque 0.1.6 Released

Yesterday I released Tasque 0.1.6 to a legion of hungry Linux users. I can't believe it's been three months since 0.1.5 was released! You can expect to see 0.1.7 a lot quicker, especially because there are some good patches in bugzilla that just need a bit of review.

As you might expect, Tasque 0.1.6 is our best release yet. There's a new task entry widget at the top of the main window, and due dates are parsed right out of the task text. Plus, there are the usual handful of bug fixes, including a few crashers.

Give it a try, and let us know what you think!



Sunday, June 8, 2008

Dear LazyWeb: TiVo, MythTV, Decisions

So we have a TV in the bedroom now. We generally watch TV in the living room, where we have an old Series 2 TiVo that does the job. Now, in the bedroom, we miss the essential TiVo features: accessing recorded shows and pausing/rewinding/fastforwarding live TV.

As far as I can tell, these are my options:
  1. Buy a new TiVo + subscription for the bedroom.
  2. Set up a MythTV box in the bedroom that can get content from the other TiVo using tivodecode.
  3. Buy a MediaMVP or AppleTV and somehow rig it up with tivodecode so I can access content from the other TiVo. This doesn't allow me to pause/rewind/fastforward live TV, though.
Buying a new TiVo has the following costs:
  • New TiVo box: $99
  • New TiVo wireless adapter: $59
  • New TiVo subscription: ~$6/mo
  • Total over one year: $230
Option 2 is setting up a complete MythTV backend+frontend and deploying it in the bedroom. Considering that I'd have to buy a complete PC with a TV tuner, and I'd want it to be attractive and quiet, this would probably be $500-$800. Alternatively I could set up an ugly backend and an attractive frontend, but I doubt that would be any cheaper. This would allow me to have complete TiVo functionality (and more) in the bedroom, and would prevent me from falling further into the TiVo lock-in trap. It's a very tempting solution, but I'm put off by the initial cost.

The Hauppage MediaMVP seems pretty cool. It's hackable, can be made into a MythTV frontend if I ever decide to go down that road, and is super-cheap at $150. The only problem is that I'd either have to use Windows to serve it content, or hack it with MediaMVP Media Center, which doesn't seem very easy to use.

I'm not sure if I can use an AppleTV on my standard def TV. Its only advantage over the MediaMVP is sheer processing power (and easy-to-use interface if I used the provided software). It costs $229.

I guess I have to decide if manipulating live TV in the bedroom is important to me. If not, I could get a MediaMVP or AppleTV and rig up something on the server side to pull content from my TiVo and prep it with tivodecode. This could later be expanded into a full MythTV setup when I feel ready to invest in backend hardware.

However, if pausing/rewinding/fastforwarding live TV is a must, then it seems the more efficient choice is to buy another TiVo.

So, LazyWeb...what should I do? Do you use MythTV? Any compelling reasons that I should invest in setting it up?

Monday, May 19, 2008

Busy busy busy

If you've been desperately waiting for my weekly UIA status update, I'm sad to report that I'll no longer be posting those. You can track the team's progress via the development schedule page on the wiki. Never fear, if I have something interesting to share, I will make sure to post for you!

I've started helping out with Tasque maintenance, so I triaged a bunch of bugs and applied some patches. I think we'll be ready for a new release soon. I like working on Tasque; it's a fun project.

I installed openSUSE 11 Beta 3 in a VM last week. It's looking pretty good! The new intlclock applet is very cute with its weather integration. In openSUSE 10.3, I struggled a lot with package management...YaST's GTK+ interface was easy to use but crashed a lot, zypper had a very nice CLI but was ridiculously slow, and I ended up using the ncurses YaST UI, and leaving it up all day so that I could avoid the slow repository updates. In openSUSE 11, things are worlds better:
  • Zypper is wicked fast, and is now my favorite way to manage packages. All it lacks is tab-completion of package names, but running `zypper se somepackage` is so fast that I don't mind too much. ;-)
  • YaST's GTK+ interface has been updated to GTK2 (so it fits in with the rest of my desktop), no longer pops up a kabillion windows when you install packages (so I can, you know, use my computer while I install stuff), and seems really stable. I found some usability problems, but Sunday I wrote a patch and this morning Michael Meeks committed a modified version of it. YaST's GTK+ code was really easy to follow, by the way, considering I'd never looked at it before. Kudos to the YaST team!
I hope Firefox is better on openSUSE 11. Maybe it's just my crufty 10.3 install, but I've always had freezing/crashing issues with FF2 and FF3. It seems to be running fine in my openSUSE 11 VM, so I'll keep my fingers crossed. Looking forward to doing a clean install of openSUSE 11 on my main machine soon.

Oh and by the way, I'd like to toss out a quick immature Fuck You to Blogger for never auto-saving my posts, constantly crashing Firefox this morning, and having some weird display problem where the "Compose New Post" page has teeny tiny fonts. I guess I shouldn't care too much about the display of the page, since I apparently can't use it to write posts anymore. Normally FF3 restores the contents of text boxes after a crash, but for whatever reason this is not supported by Blogger. Hooray for using Tomboy as a text editor. :-/

Next, spiders...

Tomboy 0.10.2 Released; Please update your distro's packages if you want sync to work!

I just released Tomboy 0.10.2, which addresses a problem in newer distros where the output of `mount` has changed for FUSE shares.

This really needs to get into openSUSE 11, Ubuntu Hardy, etc, or else note synchronization works very poorly. If your distro has a policy of not taking new releases but you can take patches, here's a very simple patch against 0.10.1:

http://svn.gnome.org/viewvc/tomboy/branches/gnome-2-22/Tomboy/Synchronization/FuseSyncServiceAddin.cs?r1=1980&r2=2008&view=patch

I look forward to upgrading sync to use GIO or Conduit in the future so that we can avoid these areas of fragility in our code base.

Monday, May 12, 2008

Tomboy 0.11.0 released, et UIA

This morning I released the first development release in the 0.11.x series. Tomboy 0.11.0 features Boyd's Tasque add-in, the beginning of John Anderson's rewrite of the printing add-in (goodbye libgnomeprint!), and even a patch or two from our founding father. The new printing add-in lacks a few features, most notably text styling/formatting. We'll make sure to get it fixed before 0.12.0 is released, but if you want to see it fixed faster, patches are welcome. :-P

Last week didn't feel very productive at work. I made one commit and a table mapping winforms controls to UIA ControlTypes. I don't really understand where the time went. :-( How many hours did I lose wrestling with my Vista VM, or exploring the Mono implementation of the WebBrowser control? Fortunately, as the table shows, I have PLENTY of work to do! So I'd better get to it...

Monday, May 5, 2008

Mario Kart Wii Friend Code

Forgot to mention...got Mario Kart Wii. Beat all 50CC races but still can't beat Jordan. I don't think there's ever been a video game where I could beat my friends. :-)

Here's my Mario Kart friend code if anyone's into that junk:

3265-5667-2633

I'm too busy right now to rant about the absurdity of this friend code garbage. You can probably divine your own identical rant if you know that this 12-digit code is not the same as my 16-digit Wii friend code, which (as far as I can tell) is good for basically nothing.

UPDATE (sorry for planet spam): I'm not really playing much Mario Kart, so I haven't been putting in anybody's code. I left this post up because people seem to be using it as a resource to find other players. Don't expect me to join in, but please have fun!