10

Cannot find the answer elsewhere,

I'm asking for a documentation of the process to create a new template for quickly. I'm interested in writing a pyside (python + qt4) template like the pygtk one.

Can anyone help me?

1 Answer 1

10

Getting started quickly, so to say

The easiest thing to do is to base your first template on an existing one, and modify it to your needs. After running the following command, you'll have an ubuntu-application-qt template based on the ubuntu-application original template. You'll find it on /home/$USER/quickly-templates, ready to modify to your heart's content:

quickly quickly ubuntu-application ubuntu-application-qt

Background

Here are some resources that will help you:

Quickly templates can be written in whatever language you want. They are just a set of commands in a directory, containing commands to copy images, documents and interacting with the user.

Adding a command is quite easy: just drop it into the root template directory (data/templates in the Quickly source tree, or in /usr/share/quickly/templates/) and make it executable. Quickly will know by this way that the current file is a command that Quickly Core can launch.

Consequently, if you need additional internal commands that can be launched only by your own commands, just create a subdirectory in your template and add it there.

There are also some helpers if you need those names when creating a new command:

from quickly import templatetools

python_name = templatetools.python_name(project_name)
sentence_name, camel_case_name = templatetools.conventional_names(project_name)

And to load the project_name (see the blog post above on part 6):

if not configurationhandler.project_config:
    configurationhandler.loadConfig()

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .