Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

GuillaumeDesforges/pyjst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyjst : Python Json simple Templating

Bake a template from corresponding JSON object

Warning : after some experience, JSON is NOT Pythonic. Use YAML instead.

How to use

Install (Python 3) : pip install pyjst

Create a project directory with given structure :

  • project_name/
    • datas/
    • templates/

In templates/ you can put templates with extension .html. In datas/ you can put corresponding data with extension .json. What this module does is simply render asked template name.tmpl with corresponding data name.json. The output is generated in folder output/.

For instance let this file tree :

  • example/
    • datas/
      • example.json
      • another.json
    • templates/
      • example.tmpl
      • another.tmpl

So go into your project folder : cd example

Then generate your static page example : pyjst example

Or generate static page another : pyjst another

You can specify more to the command (templates folder, output file path, JSON data file path), use pyjst -h to know how to use it.

About

Python JSON Static Templating

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages