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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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
Here are some resources that will help you:
IMPORTstatement from the Quickly template language to import a subset of commands from an existing template. Here's an example taken from the ubuntu-cli template
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()