Extension Installation

This page contains thoughts on how to get and install Jokosher extensions.

There should be two ways of getting an extension: getting an extension file directly and installing it, or using some sort of "extension browser" in Jokosher to find extensions that might be relevant.

Fetching an extension directly

If the user fetches an extension directly, then installation of that extension should be as simple as dropping it in an appropriate directory. We should have a set of "extension directories" which are searched for extensions. These should include:

  • A "system" directory, something like /usr/lib/jokosher/extensions
  • A "user" directory, something like $HOME/.jokosher/extensions

For extra credit, implement the following:

  • Allow the user to override or add to the extensions directory with an environment variable, so that they can store extensions in some other directory like $HOME/Library/Jokosher/Extensions if they like
  • Make extensions directly runnable as applications: running a extension should say "I am a Jokosher extension: now installing myself" and move itself to the user's extension directory (see ExtensionInstallThemselves for how to do this technically)
  • Allow an extension to be a Python Egg rather than just a plain .py file so that it can contain multiple files (see ExtentionsAsEggs for an example of how this is achieved in Jokosher)

(Technical implementation note: parsing a folder for extensions is trivial in Python using an import hook.)

Extension Browser

Jokosher should ship with an Extension Browser that lists extensions by name and description and allows users to install a extension by clicking on it. This requires the One True Extension Repository to exist somewhere, like extensions.jokosher.org, which is quite a big undertaking (you have to build a web app to allow uploading of extensions, handle authorisation, etc, etc), but it solves the discoverability problem: if someone has written an extension which allows you to do the thing that you want to do, how do you find out about it or even that it exists?

For extra credit, don't require extensions.jokosher.org to host extensions and allow uploads and so on; instead, make it an automatic aggregator that goes out onto the web and finds Jokosher extensions wherever they may be and adds them to its list. The idea here is that people publish extensions on their own sites somehow and extensions.jokosher.org knows about them, without being explicitly told, so it's all magic and automatic. Services like technorati might help here.