#!/usr/bin/env python3
# -*- coding: utf8 -*-

# Built-in modules #
import sys, argparse

# Internal modules #
import pymarktex

# Create a parser #
parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
parser.add_argument("input_file", help="The markdown file to process", type=str)
parser.add_argument("--template", help="The template to use", type=str)

# Parse the shell arguments #
args       = parser.parse_args()
input_path = args.input_file
template   = args.template

# Make the document #
doc = pymarktex.Document(input_path, builtin_template=template)
doc.generate()