#!/usr/bin/env python
# coding: utf-8

from __future__ import unicode_literals

import argparse
from tjst import compile_file2file

DEF_EXT = 'html,txt,shtml,htm'

parser = argparse.ArgumentParser()
parser.add_argument("src", help="source template file or directory")
parser.add_argument("dst", help="destination compiled templates file")
parser.add_argument("-e", "--extensions", default=DEF_EXT,
                    help="list of extensions allowed. Set it to '*' if you want to allow any file. Default is '%s'" %
                         DEF_EXT)
args = parser.parse_args()
compile_file2file(args.src, args.dst, args.extensions.split(','))
