Skip to main content

Provide velocity templating capability to moban

Project description

https://api.travis-ci.org/moremoban/moban-velocity.svg https://codecov.io/github/moremoban/moban-velocity/coverage.png https://badge.fury.io/py/moban-velocity.svg https://pepy.tech/badge/moban-velocity/month https://img.shields.io/github/stars/moremoban/moban-velocity.svg?style=social&maxAge=3600&label=Star

With airspeed for Python 3, this library allows moban users to have velocity template in their next documentation endeavour.

Given the following data.json:

{"people":
    [
        {"name": "Bill", "age": 100},
        {"name": "Bob", "age": 90},
        {"name": "Mark", "age": 25}
    ]
}

And given the following velocity.template:

Old people:
#foreach ($person in $people)
 #if($person.age > 70)
  $person.name
 #end
#end

Third person is $people[2].name

moban can do the template:

$ moban --template-type velocity -c data.json -t velocity.template
Velocity-templating vo.t to moban.output
Velocity-templated 1 file.
$ cat moban.output
Old people:

Bill

Bob


Third person is Mark

Installation

You can install moban-velocity via pip:

$ pip install moban-velocity

or clone it and install it:

$ git clone https://github.com/moremoban/moban-velocity.git
$ cd moban-velocity
$ python setup.py install

Author

Ayan Banerjee

Contributors

In alphabetical order:

Change log

0.0.2 - 03.06.2020

Added

  1. Support moban v0.6.0+

0.0.1 - 02.02.2018

First release

  1. Render .velocity, .vtl files for moban

Download files

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

Files for moban-velocity, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size moban_velocity-0.0.2-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size moban-velocity-0.0.2.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page