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
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