Skip to main content

Yet another jinja2 cli command for static text generation

Project description

https://api.travis-ci.org/chfw/moban.svg?branch=master https://codecov.io/github/chfw/moban/coverage.png https://readthedocs.org/projects/moban/badge/?version=latest

moban brings the high performance template engine (JINJA2) for web into static text generation.

Installation

You can install it via pip:

$ pip install moban

or clone it and install it:

$ git clone http://github.com/chfw/moban.git
$ cd moban
$ python setup.py install

Quick start

Here is a simple example:

$ moban -c data.yml -t my.template
$ cat moban.output

Given data.yml as:

hello: world

and my.template as:

{{hello}}

moban.output will contain:

world

the tutorial has more use cases.

Usage

usage: moban [-h] [-cd CONFIGURATION_DIR] [-c CONFIGURATION]

[-td [TEMPLATE_DIR [TEMPLATE_DIR …]]] [-t TEMPLATE] [–template_type TEMPLATE_TYPE] [-o OUTPUT]

Yet another jinja2 cli command for static text generation

optional arguments

  • -h, –help show this help message and exit

  • -cd CONFIGURATION_DIR –configuration_dir CONFIGURATION_DIR the directory for configuration file lookup

  • -c CONFIGURATION, –configuration CONFIGURATION the dictionary file

  • -td [TEMPLATE_DIR [TEMPLATE_DIR …]], –template_dir [TEMPLATE_DIR [TEMPLATE_DIR …]] the directories for template file lookup

  • -t TEMPLATE, –template TEMPLATE the template file

  • –template_type TEMPLATE_TYPE the template type, default is jinja2

  • -o OUTPUT, –output OUTPUT the output file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moban-0.0.1.zip (10.2 kB view hashes)

Uploaded Source

Built Distribution

moban-0.0.1-py3.4.egg (17.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page