June 2006

Visor

This is just too cool. Visor is from the people who brought you the wonderous app that is Quicksilver and, while I’ve only been using it for less than a day, It’s made my life that little bit brighter.

Visor basically impliments a “Quake” style terminal dropdown. ^F1 by default toggles the slidie-outie terminal goodness, but it can be assigned any key combo that you desire.

I use the terminal a lot in my day to day work and have a Quicksilver trigger set up for it, but having the window so easily hideable without losing the window’s state is so very handy. I do of course still have a few other terminal windows open, but for the quick’n'dirty commands that need to be run, Visor is indispensible.

Unfortunately, it’s only available for OSX 10.4 and upwards. Those of you still on Panther are missing out.

IT
Mac

Comments Off

Permalink

Arkivo v0.2

Arkivo has reached the heady heights of version 0.2! This version incorporates a complete rewrite of the IRC bot to allow it to connect to multiple servers. This means Arkivobot is no longer restricted to Freenode, but can roam the networks freely as is a bot’s want. Arkivobot is currently connected to Freenode and OFTC, but if you want your channel archived and you’re on another network I can easily accomodate you (email me for more details)

Because of the addition of multiple networks I had to change the URL structure. For example, to access the archive for #turbogears:

Old URL: http://irclog.turbogears.org/archive/turbogears/
New URL: http://irclog.turbogears.org/archive/freenode/turbogears/

This will prevent URL clashes in case a channel has the same name on two different networks. Arkivo is nice and freindly though; if you use one of the old URL’s you will be redirected and asked to update your bookmarks.

Also included in this version is a visible bot status and a bugfix to prevent the bot dying if it encounters encoding that isn’t supported by the channel.

TurboGears
Web Dev

Comments (4)

Permalink

Gmail for your domain

It seems Google is beta testing a version of GMail which will allow you to have your domain’s email handled exclusively by GMail. Unfortunately, although I applied, I’ve heard nothing back after applying for the Beta.

This is something that I’ve wanted for a long time but the ability to register your email addresses with GMail and then send using that email address was never up to par, mainly because Microsoft Outlook puts all of that “on behalf of” crap in the “From” line and still shows your gmail address.

I’m hopeful that I’ll either be accepted for the beta or, when it’s released, it’s just as costly as standard GMail.

IT

Comments Off

Permalink

Arkivo launched

I launched Arkivo earlier today, in its first incarnation at least. It was written originally to archive the happenings in #turbogears on Freenode but there is already another channel using the service, #foresight - the channel for the Foresight Linux distribution. Any other channels on Freenode that need archiving are more than welcome to be added to the list. Email me to have the bot join your channel.

Happily, everything seems to be ticking over nicely. I still have quite a few features planned including searchable archives, direct linking to individual messages (obviously in the flow of the conversation, so it’s in context), automatic creation of clickable links (which is harder than it sounds when using Kid) and a few other bits and pieces that I’m going to keep under my hat in case they don’t actually see the light of day.

Hopefully I’ll have a Trac/SVN instance up soon, subject to server load. Failing that I may take a look around for a hosted option, I’ll just have to see how it pans out after a few days of arkivo being up along with the other sites I’m hosting.

TurboGears

Comments Off

Permalink

Idenitity using email addresses

I’m a picky programmer and I like to have things “just so”. I’m creating an app using Turbogears and it’s Identity framework, but I wanted to have people log on using their email address rather than an arbitrary username. I didn’t fancy messing around with the SOProvider myself, nor did I want to just stuff an email address into a field called username in my database (I did mention I was picky, right?).

The solution is simple, but I thought I’d share this anyway as the theory behind it is fairly powerful.

class User(SQLObject):
        email_address = UnicodeCol( length=255, alternateID=True,
                               alternateMethodName="by_email_address" )
        ....
        def _get_user_name(self):
                return self.email_address

        def _set_user_name(self, new):
                self.email_address = new

        @classmethod
        def by_user_name(self, text):
                return self.by_email_address(text)

Now, as I said, this is pretty simple at first glance but it tricks SOProvider (or anything else that accesses the user_name property) into thinking that the user_name is a real item in the database. In effect, we are giving email_address an “alias” of user_name.

You can also use this method to provide some form of action on data before it hits your database:

class Car(SQLObject):
        manufacturer = ForeignKey("Manufacturer")
        model = UnicodeCol(length=50)
        wheels = IntCol()

        def _set_manufacturer(self, name):
                try:
                       mf = Manufacturer.byName(name)
                except SQLObjectNotFound:
                        mf = Manufacturer(name=name)

                self._SO_set_manufacturer_id = mf.id

class Manufacturer(SQLObject):
        name = UnicodeCol(alternateID=True)

I wrote this code on the blog, so it’s not tested in any way, but you get the idea. You’ll be able to create manufacturers on the fly when creating or updating a Car if they’re not already available. Neat, huh?

TurboGears

Comments (4)

Permalink