Quickly

Revision 13 as of 2009-10-27 22:22:16

Clear message

quickly-logo.png

Given the richness and variety of the Linux platform, programming on Linux should be easy and fun. However, it's not easy and fun because it is too hard to learn. It is too hard to learn because there are too many choices, and too much information to wade through. Quickly strives to make programming easy and fun by bringing opinionated choices about how to write different kinds of programs to developers. Included is a Ubuntu application template for making applications that integrate smoothly into the Ubuntu software infrastructure.

GTD is easier with GTDQ (Get Things Done Quickly)!

Installation

Quickly is in universe for Ubuntu 9.10 (Karmic):

$ sudo apt-get install quickly

(This will install quickly-ubuntu-template as well)

How to Get Started

0. Having some basic information (optional)

$ quickly tutorial ubuntu-project

1. Create a Ubuntu Project and run the tutorial:

$ quickly create ubuntu-project foo
$ cd foo
$ quickly tutorial

2. You can also try:

$ quickly edit
$ quickly glade
$ quickly run

Use bash completion to get the available commands

3. How to play with package and release:

optional, but recommended to build first your package locally

$ quickly package

BE WARNED: the two following commands will connect to Launchpad. You need to have a Launchpad account and a PPA already created.

For quickly release, you also need a project on Launchpad to which you can bind your work, as well as keys set up:

$ quickly release

or

$ quickly share

Command Reference

Here are the commands available:

ubuntu-project commands:
- quickly dialog
- quickly edit
- quickly glade
- quickly tutorial
- quickly save
   it can also be: quickly save the commit message you wish
   (no launchpad interaction in this one)
- quickly release
  $ quickly release: use a default commit commentary "quickly
released" and doesn't tag the branch (it will later, retrieve it from
setup.py if it exists)
  $ quickly release "release-name": tags the branch with release-name
and add a default commit message
  $ quickly release "release-name" whatever you want to write: tags
the branch with release-name and use "whatever you want to write" as
the commit commentary
  The first time this command is processed, launchpad credential is
created (bzr is also setup for bzr whoami and bzr launchpad-login,
just keeping existing data if already present) and a target launchpad
project can be chosen. If we stop at whatever stage of the process, we
can retrieve afterwards (for instance, not setupping project can be
done when respawning the command).
  This command then, commit and tag the release in bzr (it first
prevent to tag 2 releases with the same name). Finally it pushes and
pulls the branches from/to bzr in
~user_name/project_name/quickly_trunk and open the browser to this
branch page to see changes.
- quickly change-lp-project
  Enables to change the launchpad project binding previously setted
up. If not setup, create one (asking for credential, if needed)


- staging server can be reached in two ways:
  export QUICKLY=staging
  $ quickly <whatever command using launchpad>
  $ quickly<whatever command using launchpad>
      (A warning is processed to inform you that you are targetting
staging servers).
  If then, you want to reach production launchpad environment:
  QUICKLY=
  $ quickly<whatever command using launchpad>
  or just for one command:
  $ quickly --staging <whatever command using launchpad> (--staging
can be put everywhere in the command)

Switching from staging to launchpad production server and the other
way in "quickly release and change-lp-project" is supported.


-----------------------------------------

- Same system for verbose mode (watching warning from glade, for instance):
  export QUICKLY=verbose
  $ quickly glade
  or
  $ quickly --verbose glade (--verbose can also be put everywhere in
the command)

- if we want to mix staging AND verbose mode:
  export QUICKLY="staging:verbose" (no order)


* Out of the project tree command:
- quickly start                  (NEW one! show some notes about How-to start)
- quickly new <template> <project>   (ok, I think you know that one ;))
- quickly quickly <template_origin> <template_dest>  (copy target
template in ~/.quickly-data/templates/template_dest)
-> then you can quickly new <template_dest> <project>    (it looks at
~/.quickly-data/templates/* for template searching, having a higher
priority than generic templates)


* Some miscellaneous features:
- Commands can be launched wherever you want in the current project
tree (subfolders, etc.). The template command creator does not have to
bother with it and can infer that his command is executed from the
root project tree (that is to say that the cleverness is on "quickly"
command itself).

- Hooking method for launching before/after a command: currently, new
use a pre-hook (pre_new in builtins/commands.py) common to all
project. There is no post-hook at the moment but it is supported.


- builtins commands (like quickly start, quickly quickly), available
to every templates


- it is possible to run from within a project another template command
by using -t/--template option
Let's imagine we have a <crazy> command in <template_foo> and we are
in a <ubuntu-project> project.
  $ quickly crazy will fail (no crazy command in ubuntu-project
template, nor in builtins command)
  $ quickly -t template_foo crazy will works! (as $ quickly crazy -t
template_foo btw)



- we have some generic tools now for binding to launchpad project and
creating/using credential so that template developers don't become
crazy if they want to use launchpad in their template.
Basically, to setup launchpad credential and bind to a project (or use
it afterwards), the code is:

HERE: import the right thing
# default to looking up lpi integration related to the current dir
pathname = os.path.dirname(sys.argv[0])
builtins_directory = pathname + '/../../builtins/'
if os.path.exists('/usr/share/quickly/builtins'):
    builtins_directory = '/usr/share/quickly/builtins'
builtins_directory =  os.path.abspath(builtins_directory)
sys.path.append(builtins_directory)

# connect to LP (this create credential if needed, either, retrieve it)
import launchpadaccess
launchpad = launchpadaccess.initialize_lpi()

# get the project (choose and bind to one if not already done)
project = launchpadaccess.get_project(launchpad)

and then, you can play with your launchpad and project objects in your template!
staging stuff is also supported without any extra work ;)


Of course, there is still some work to do (more error handling
bulletproof, explain if ssh-key not added to launchpad or creating one
and try to put into launchpad, and so on). But I think we are quite
in a good shape for a soon 0.1 release ;)