The Pennyworth Project

Just another WordPress site

Pennyworth 1.0b5

Pennyworth 1.0b5 is now available for download.

This is the first release of Pennyworth, the application formerly known as Genkanban. To migrate your settings from Genkanban to Pennyworth, copy or rename the following files and folders, replacing “Genkanban” with “Pennyworth”:

 
~/Library/Appplication Support/Genkanban
~/Libary/Preferences/net.aetherial.context.Genkanban.plist
 

Instead of the normal bzip’ed tarball, the link above will fetch a compressed disk image. In light of the new AppleScript functionality, a variety of sensors have been removed from the main application and replaced with straight AppleScript files. These files are named with the “Observer” prefix in the disk image and should be copied to

 
~/Library/Appplication Support/Pennyworth/AppleScript/Sensors
 

Also included is a sample action script for Adium that will update your Adium status message with your current activity (Adium.scpt). Copy this file to the folder

 
~/Library/Appplication Support/Pennyworth/AppleScript
 

In addition to the renaming and AppleScript changes, this release also includes a number of bug fixes that should address performance problems and UI glitches. I want to thank David Symonds (creator of MarcoPolo) for some performance tips and Ricky Buchanan (of ATMac) for feature suggestions and AppleScript consulting.

Prerequisites

MacOS X 10.5 “Leopard”

Growl (Recommended): Pennyworth can be used without the Growl notification system by viewing the current predictions, but this occupies precious screen real estate and you attention. In order to receive visual notifications of updated predictions, I recommend that you install and configure the Growl notification system before running Pennyworth.

Source

There is not a source distribution available yet, but if you’d like the source code, it is available via Subversion at

 

http://context-macosx.googlecode.com/svn/trunk/Tools/Applications/Pennyworth/ 

The source requires Xcode 3 to build.

Bugs, suggestions, or comments?

Please post any feedback in the comments below or send it to context@aetherial.net. This is early release software, so there will be bugs, and the application will only improve when problems are identified and submitted.

Posted by admin at 8:34 am on February 21, 2008 . Filed under Pennyworth.

New AppleScript features coming in 1.0b5

It took me long enough, but I’m happy to report that the next version of my context sensing toolkit will include some new functionality provided via AppleScript.

First of all, you can query the system for current predictions and observations:

tell application "Pennyworth"
  value of prediction named "Location"
end tell

might return something like Home. Likewise,

tell application "Pennyworth"
  value of observation named "Desktop Observer (Running)"
end tell

might return something like Safari.

Secondly, if you use other apps that call AppleScripts in response to events, you can now instruct the system to log the observation using

tell application "Pennyworth"
  log "My Observation" from observer "My Custom Observer" with duration 10
end tell

This is equivalent to an internal observer logging observations. The “from observer” and “with duration” parameters are optional. The system will choose reasonable defaults if left empty.

This functionality has been requested from a few users, so I’m glad that it is now working. If you have any comments or questions, please post them in the comments below.

Posted by admin at 4:43 pm on February 19, 2008 . Filed under Other Apps,Pennyworth.

RIP Genkanban. Long live Pennyworth!

After some discussion with my colleagues and Genkanban users, I’ve decided to rename the software “Pennyworth”. The name is based on the only butler I can recall by name: Alfred Pennyworth.

The justification for the rename is that the “Genkanban” name is clumsier than “Pennyworth” for us English speakers and (honestly) I never knew the proper pronunciation of “Genkanban”.

If you’re a current user of Genkanban, you don’t need to do anything to get the new software. I’ll be pushing out Pennyworth as part of the 1.0b5 release, so auto-updating should take care of the transition.

Posted by admin at 11:11 am on . Filed under Pennyworth.

GrowlHUD 1.5

If you’re using Growl with Genkanban and would like some consistency between the Growl notifications and the predictions window, check out Growl HUD 1.5. It uses Leopard’s new HUD windows, so it should look rather nice.

Thanks Ricky!

Posted by admin at 10:39 am on February 16, 2008 . Filed under Meta.

Genkanban 1.0b4

Genkanban 1.0b4 is now available for download.

This release fixes a number of user interface bugs, including focus issues and
case-sensitive autofilling. This release also adds a variety of new observations to the iTunes observer.

Prerequisites

MacOS X 10.5 “Leopard”

Growl (Recommended): Genkanban can be used without the Growl notification system by viewing the current predictions, but this occupies precious screen real estate and you attention. In order to receive visual notifications of updated predictions, I recommend that you install and configure the Growl notification system before running Genkanban.

Source

There is not a source distribution available yet, but if you’d like the source code, it is available via Subversion at

http://context-macosx.googlecode.com/svn/trunk/Tools/Applications/Genkanban/

The source requires Xcode 3 to build.

Bugs, suggestions, or comments?

Please post any feedback in the comments below or send it to context@aetherial.net. This is early release software, so there will be bugs, and the application will only improve when problems are identified and submitted.

Posted by admin at 8:59 pm on February 10, 2008 . Filed under Pennyworth.

Creating custom sensors with AppleScript

Genkanban ships with a variety of default sensors, but it also includes some functionality that allows you to create your own sensors using AppleScript. The process is simple and I’ll demonstrate it by creating a sensor that detects your currently selected weblog in MarsEdit.

Before we get into the details, here are some general notes about the AppleScript sensors:

1. AppleScript sensors are standard .scpt files authored in Script Editor.

2. The AppleScript files should be placed in the folder at

~/Library/Application Support/Genkanban/AppleScript/Sensors

3. On a set duration (currently 10 seconds), Genkanban scans that folder, and executes each script located within. The predictions generated by each script last for the set duration and will disappear once that duration expires or the observation is renewed on the next pass.

4. Scripts return observations by returning a semicolon-delimited string of key-value pairs in the form

key1=value1;key2=value2;...;keyN=valueN

The keys and values may contain any character, save “=” and “;”.

5. Genkanban translates the key-value pairs as separate observations in the form

AppleScript Observer (KEY) = VALUE

That said, let’s create a sensor for MarsEdit.

1. First, we need to create a script file to return the selected weblog. In Script Editor, enter the following script:

tell application "Finder"
    repeat with p in (processes whose name is "MarsEdit")
        tell application "MarsEdit"
            return "Marsedit: Current Blog=" & name of selected weblog
        end tell
    end repeat
end tell

Wrapping the call with the call to Finder allows us to only return a value when MarsEdit is actually running. If this was not included, the sensor would launch MarsEdit (if closed) each time it ran.

2. Test the script by running it with MarsEdit open and closed. When close, it should return nothing. When open, it should return something like:

"Marsedit: Current Blog=The Context Blog"

3. Save the script file and put it in the location mentioned above.

4. If Genkanban is running, in less than ten seconds, the script will be executed and the results will be visible in the observations window:

Genkanban: AppleScript observer

5. Congratulate yourself on a job well done.

Some parting thoughts: At the moment, Genkanban uses a ten second interval for executing and retiring observations. I may extend this interval to longer period or make it user-configurable. There’s a tradeoff between having reliable current observations and executing the scripts too often that I’m still negotiating.

Posted by admin at 12:41 pm on February 5, 2008 . Filed under Pennyworth.

Genkanban 1.0b3

Genkanban 1.0b3 is now available for download.

This is the first public release of Genkanban and should be considered quite beta. There are likely the normal memory leaks and other issues present in early release software. That said, I have been using this version for some time and it hasn’t presented me with any major problems.

This release fixes a number of UI bugs present in prior private releases.

Prerequisites

MacOS X 10.5 “Leopard”

Growl (Recommended): Genkanban can be used without the Growl notification system by viewing the current predictions, but this occupies precious screen real estate and you attention. In order to receive visual notifications of updated predictions, I recommend that you install and configure the Growl notification system before running Genkanban.

Source

There is not a source distribution available yet, but if you’d like the source code, it is available via Subversion at

http://context-macosx.googlecode.com/svn/trunk/Tools/Applications/Genkanban/

The source requires Xcode 3 to build.

Bugs, suggestions, or comments?

Please post any feedback in the comments below or send it to context@aetherial.net. This is early release software, so there will be bugs, and the application will only improve when problems are identified and submitted.

Posted by admin at 10:16 am on February 3, 2008 . Filed under Pennyworth.

Training Genkanban

At its core Genkanban does two things: predicts your context and takes actions on the basis of the predicted context. When first installed, Genkanban does not “know” you and cannot predict your context until it is trained. There are two methods of training Genkanban, described below. In order for Genkanban to function, you must first spend some time training it.

All of the functionality described below is accessible from the Genkanban status menu represented by a bell in menu bar:

Genkanban: Status menu

Training method 1: Uniform sampling

Using uniform sampling of your context, Genkanban collects context labels from you at regular intervals. This is the conceptual equivalent of someone asking you every five minutes, “Am I doing it right?”

To enable this training method, open the Preferences and select the Training tab. Within this tab, you can select a training interval ranging from thirty seconds to five minutes. This is how often Genkanban will interrupt you for new context labels. You may choose to enable an audible cue that sounds with the interruption. This sound is a small bell and may be useful if you work on a busy desktop where a small window my be lost among the others.

Genkanban: Training preferences

To begin training, click the “Start Training” button. The system will begin to interrupt you periodically until you stop the training. You may adjust the interval or toggle the audible cue without stopping and restarting the training process. In addition to the button within the preferences, training may be toggled using the “Start Training” menu item under the bell icon in your status bar. Restarting training does not begin the process anew – instead it simply continues from where it left off.

Genkanban: Training window

(Note that as of 1.0b3, there is no “reset training” functionality. You would like to start over, please post a comment below and I’ll provide instructions for resetting training. This functionality will be included in a future revision.)

Training method 2: Correct on error

If you do not want to be interrupted periodically and would like to take responsibility for monitoring Genkanban’s training, you can use a simple “correct on error” approach to teaching Genkanban. To do this, select “Predictions…” from the bell menu in your status menu. This will bring up a translucent black heads-up display (HUD) that can be placed anywhere on your screen. This HUD displays the context Genkanban currently predicts:

Genkanban: Current predictions

If you see that Genkanban is making an incorrect prediction, you can correct it by selecting “Correct Current Prediction…” from the bell status menu. This brings up the window used to train Genkanban and you can select an existing label or enter a new one. When you click the “Set” button, your current context and environment is sent to the machine learner and this generates a new prediction based on the new evidence.

The pros and cons of the different methods

The uniform sampling training method will collect more information about you as you use the computer throughout the day. You will not have to remember to give it new information, as it will periodically interrupt you for context labels.

The “correct on error” method eliminates the interruptions at the cost of you being responsible for verifying the predictions of the system. Ideally, this method only collects labels that contradicts the existing model, so the a wider variety of contexts should be predictable using a smaller number of samples.

Please note that these training methods are not mutually exclusive and can be intermixed as desired. You can correct the system’s current prediction while using the uniform sampling method. You my choose to begin using the uniform sampling method and then switch over to the “correct on error” method.

I personally prefer to use the “correct on error” method to avoid the regular interruptions. However, I do not know which method is the optimal one for building a more reliable model. This is an open research question that I plan to answer while building this system.

Posted by admin at 10:04 am on . Filed under Pennyworth.