Skip to content

castedo/jinjagen

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

jinjagen

jinjagen is a short simple extensible Python script using jinja2 to generate files from source template files. I use this to generate simple static websites.

Usage

cd srcdir
jinjagen destdir

Filenames XYZ.jinja under srcdir generate files called XYZ under destdir. Any file or folder whose name starts with . or _ is ignored. You want to pair jinja with other tools to deal with files and folders that are not jinja templates. See this example.

To hook in extra functionality from any Python module do:

cd srcdir
jinjagen -m a_python_module destdir

where a_python_module is the name of a Python module.

This package includes the module jinjagenadd which can be used for some basic functionality and as an example of how to create alternative modules. For details and usage see this example.

Install

python3 -m pip install git+https://github.com/castedo/jinjagen.git

About

Short extensible Python script using jinja2 to generate static websites

Resources

License

Stars

Watchers

Forks

Packages

No packages published