UPDATE: A command porting walk-through has beed added to the documentation.
Back around UDS time, I began work on a reboot of Quickly, Ubuntu’s application development tool. After two months and just short of 4000 lines of code written, I’m pleased to announce that the inner-workings of the new code is very nearly complete! Now I’ve reached the point where I need your help.
First, let me go back to what I said needed to be done last time. Port from Python 2 to Python 3: Done. Add built-in argument handling: Done. Add meta-data output: Well, not quite. I’m working on that though, and now I can add it without requiring anything from template authors.
But here are some other things I did get done. Add Bash shell completion: Done. Added Help command (that works with all other commands): Done. Created command class decorators: Done. Support templates installed in any XDG_DATA_DIRS: Done. Allow template overriding on the command-line: Done. Started documentation for template authors: Done.
Now it’s your turn
With the core of the Quickly reboot nearly done, focus can now turn to the templates. At this point I’m reasonably confident that the API used by the templates and commands won’t change (at least not much). The ‘create’ and ‘run’ commands from the ubuntu-application template have already been ported, I used those to help develop the API. But that leaves all the rest of the commands that need to be updated (see list at the bottom of this post). If you want to help make application development in Ubuntu better, this is a great way to contribute.
For now, I want to focus on finishing the port of the ubuntu-application template. This will reveal any changes that might still need to be made to the new API and code, without disrupting multiple templates.
How to port a Command
The first thing you need to do is understand how the new Quickly handles templates and commands. I’ve started on some documentation for template developers, with a Getting Started guide that covers the basics. You can also find me in #quickly in Freenode IRC for help.
Next you’ll need to find the code for the command you want to port. If you already have the current Quickly installed, you can find them in /usr/share/quickly/templates/ubuntu-application/, or you can bzr branch lp:quickly to get the source.
The commands are already in Python, but they are stand-alone scripts. You will need to convert them into Python classes, with the code to be executed being called in the run() method. You can add your class to the ./data/templates/ubuntu-application/commands.py file in the new Quickly branch (lp:quickly/reboot). Then submit it as a merge proposal against lp:quickly/reboot.
Grab one and go!
So here’s the full list of ubuntu-application template commands. I’ll update this list with progress as it happens. If you want to help, grab one of the TODO commands, and start porting. Email me or ping me on IRC if you need help.