26 lines
421 B
Python
26 lines
421 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import os.path
|
||
|
import sys
|
||
|
|
||
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||
|
import j2common
|
||
|
|
||
|
|
||
|
def main():
|
||
|
if len(sys.argv) < 2:
|
||
|
raise ValueError('not enough arguments (min: 1)')
|
||
|
|
||
|
j2common.init()
|
||
|
|
||
|
ret = 0
|
||
|
for f in sys.argv[1:]:
|
||
|
if not j2common.render_file(f, None, False):
|
||
|
ret = 1
|
||
|
|
||
|
sys.exit(ret)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|