Licence

GPL3 or later.

Purpose

This tool brings that special feature to the console which previously required full-fledged IDEs or the cp-command: Creation of a new software project by templates.

The package already contains a small set of templates but creating your own is very easy, indeed. The most simple template just copies some files and folders to the newly created source directory. More sophisticated ones perform many different changes on the source files like adding the author's initials by replacing variables or placing licence headers. It is even possible to parametricaly include or exclude whole code blocks.

How it works

The tool consists of a small python application together with accompaigning templates. Since the application itself is console based (adding further UIs is quite simple, though) the template system distinguishes between screens and templates. Screens are just plain text files with console output. They container a title line followed by a blank line and the actual text displayed when the screen is shown. The text than contains special commands in order to show lists of templates and screens and to branch to other screens and templates.

Templates consist of two parts: A mini-file which is actually a python script run by the main application and an equaly named directory which contains all files which need to be copied and changed. The mini-file contains some global declarations like the template's name, licecne and author and a single process function. This function takes a processor object which is the template's interface to the application. This object contains several methods for user interaction (don't use print or getline() directly, never ever, as you cannot assume the template to always be run on a console), file creation and manipulation.

Documentation

Documentation is very incomplete at this time. Except for this page it is yet pretty much non-existing.

Download

Check out your copy from subversion today: https://ncc-1701a.homelinux.net/svn/source_tree_factory/



attachments

imageappend Append an Image
>