| spg (version 0.1, 04 February 2008) | index /home/muhuk/subversion/spg/release/0.1/spg.py |
Static File Generator
Templates consist of a header part and template body. Two parts are seperated
with 2 blank lines ('\n\n\n').
Template body is a string which includes anchors where you want to insert other
text. Anchor are in python (string interpolation) format. For example
"%(SOME_VARIABLE_NAME)s"). Values can come from the template itself, its parent
(if present) or some other template linked.
Every line in header part contains one statements and if needed some arguments.
Header statements include:
extend MOUNT_POINT "/path/to/parent/template"
define SOME_CONSTANT_NAME "Value as a string"
link SOME_VARIABLE_NAME "path/to/another/template" [extra_arguments]
output ["/alternate/output/path"]
(Square brackets indicate optional arguments)
(More help on header statements at class documentation)
Once you have your templates prepared put them together with other files needed
(images, etc.) in a directory and run spg from command line like:
spg.py /home/me/web/my/site/
Command line options are:
-w or --overwrite: To render and save all templates unconditionally. If you
don't set this parameter templates are only rendered
when necessary.
-c or --copy: [NOT IMPLEMENTED] Copies all files but the templates to
a directory or archive depending on the parameter given.
-o or --output-extension: Overrides the default output extension (html).
-h or --help Displays a not so helpful help.
| Modules | ||||||
| ||||||
| Classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||
| ||
| Data | ||
| __author__ = u'Atamert \xd6l\xe7gen <muhuk@muhuk.com>' __date__ = '04 February 2008' __version__ = '0.1' | ||
| Author | ||
| Atamert Ölçgen <muhuk@muhuk.com> | ||