remove templater
This commit is contained in:
parent
cc46c8779f
commit
f77a6175a4
2 changed files with 2 additions and 23 deletions
|
@ -1,23 +0,0 @@
|
|||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
import ast
|
||||
import os
|
||||
import sys
|
||||
from jinja2 import Environment, FileSystemLoader, Template
|
||||
|
||||
template_dir = os.path.abspath(os.path.dirname(sys.argv[1]))
|
||||
template_name = os.path.basename(sys.argv[1])
|
||||
|
||||
env = Environment(loader=FileSystemLoader(template_dir))
|
||||
env.block_start_string = '((*'
|
||||
env.block_end_string = '*))'
|
||||
env.variable_start_string = '((('
|
||||
env.variable_end_string = ')))'
|
||||
env.comment_start_string = '((='
|
||||
env.comment_end_string = '=))'
|
||||
|
||||
template = env.get_template(template_name)
|
||||
rendered = template.render(ast.literal_eval(sys.argv[2]))
|
||||
|
||||
print(rendered)
|
Loading…
Add table
Add a link
Reference in a new issue