Add event table template. Also inspect arrays for objects.

This commit is contained in:
Kegan Dougal 2015-05-21 10:39:54 +01:00
parent 0899e0b772
commit a42a22028c
4 changed files with 37 additions and 6 deletions

View file

@ -79,9 +79,12 @@ def main(file_stream=None, out_dir=None):
return code
def indent(input, indent):
def indent_block(input, indent):
return input.replace("\n", ("\n" + " "*indent))
def indent(input, indent):
return " "*indent + input
def wrap(input, wrap=80):
return '\n'.join(textwrap.wrap(input, wrap))
@ -92,6 +95,7 @@ def main(file_stream=None, out_dir=None):
)
env.filters["jsonify"] = jsonify
env.filters["indent"] = indent
env.filters["indent_block"] = indent_block
env.filters["wrap"] = wrap
# load up and parse the lowest single units possible: we don't know or care