plusplusbot: Karma for anything and anyone #

The recent release of Foamee reminded me that I had never blogged here about plusplusbot, a little toy of a site that I started to work on this past summer. The idea behind plusplusbot is that you can express your (dis)pleasure with something or someone over Twitter, and the site will keep track of the target's score over time. All of this is done over Twitter, in a barnacle-like fashion. The thinking being that Twitter handles message delivery over a variety of mediums (Jabber, SMS, Web) and provides a ready-made social network to piggyback on (you can view the activity of you and those you follow, for example, here's mine). This concept should be familiar to those that have enountered "karmabots" in chatrooms.

The targets can be anything. Companies, food, people, even Twitter itself. For whatever reason, the site has caught on most with Japanese Twitter users, so the homepage is often incomprehensible.

Technically, the site is not too exciting. Like Twitter Digest, it also uses python-twitter to talk to Twitter and templet for simple templates. The site itself is not dynamic at all, instead a script running on one of my machines polls Twitter every two minutes (since it has to fetch both friend updates and direct messages, fetching both every minute would go over Twitter's 70 requests/hour API rate limit). If it determines that a new plusplus or minusminus has been sent, it re-generates those pages (the user's and the target's) and uploads them. The simple design means that the site can be hosted nearly anywhere.

Macros for the new version of Gmail #

As those of you on the new version of Gmail might have noticed, nearly all Greasemonkey scripts that used to work on the old version no longer do. Even though it looks pretty similar, the new Gmail is entirely different from a JavaScript, HTML and CSS perspective, so this isn't surprising. Some of the scripts are no longer necessary. For example, saved searches aren't really needed, since searches now get their own URLs and can be bookmarked.

However, my Macros script is still needed; while the new version of Gmail does have additional keyboard shortcuts, it's still not possible to do everything from the keyboard. I've therefore ported it for the new version of Gmail, to install it, click below.

Install Gmail Macros

More specifically, the following keyboard shorcuts have been ported over:

  • g: Go to label
  • l: Apply label
  • b: Remove label
  • e: Archive (regardless of view, unlike "y")
  • d: Discard (mark as read and archive)

There is also a new keyboard shortcut, which the old script didn't have:

  • f: "Focus" the current view (only show unread, starred or inbox messages)

You may remember the script supporting other keyboard shorcuts. Since the new version of Gmail supports additional shortcuts, those have obsoleted. The new ones are:

  • shift + i: Mark as read
  • shift + u: Mark as unread
  • shift + 3: Move to trash (not actually new, but not many people seem to know this one)
  • shift + 8 followed by a, n, r, u, s, or t: Select all, none, read, unread, starred, or unstarred

For those of you adventurous enough to look at the script source, you'll notice that it uses a gmonkey object that is present on the window, which in turn gets you a gmail object with methods like getNavPaneElement() and getActiveViewType(). What this means is that the version of Gmail, in addition to being faster, also has semi-official support for Greasemonkey scripts. I'm pretty sure docs for this API will be out soon, but in the meantime, feel free to look at the script and use a tool like Firebug to investigate the properties of the gmonkey and gmail objects and play around.

Update on 11/06/2007: And here are the semi-official docs.