2024-07-16 02:43:08 +03:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
if len(sys.argv) < 2:
|
|
|
|
raise ValueError('not enough arguments (min: 1)')
|
|
|
|
|
2024-07-20 16:35:39 +03:00
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
import j2cfg
|
2024-07-16 02:43:08 +03:00
|
|
|
|
2024-07-20 16:35:39 +03:00
|
|
|
r = j2cfg.J2cfg(strict=False)
|
2024-07-16 02:43:08 +03:00
|
|
|
ret = 0
|
|
|
|
for f in sys.argv[1:]:
|
2024-07-20 16:35:39 +03:00
|
|
|
if not r.render_file(f, None):
|
2024-07-16 02:43:08 +03:00
|
|
|
ret = 1
|
|
|
|
|
|
|
|
sys.exit(ret)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|