diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/resumejson_converter | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/resumejson_converter b/bin/resumejson_converter new file mode 100755 index 0000000..5d28262 --- /dev/null +++ b/bin/resumejson_converter @@ -0,0 +1,30 @@ +#!/bin/python3 + +import sys +import logging + +import argparse + +import resumejson_converter.utils.json as ujson + +from resumejson_converter.generators.html import generate as generate_html +from resumejson_converter.generators.pdf import generate as generate_pdf + +logging.basicConfig(level=logging.INFO) + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--resume", help="JSON Resume file to transform", default="resume.json") + parser.add_argument("--template", help="Specifie an jijna2 template file", default="templates/template.html") + parser.add_argument("--html", help="Html file output") + parser.add_argument("--nopdf", help="Don't generate pdf", action="store_true") + args = parser.parse_args() + + resume = ujson.load(args.resume) + html = generate_html(resume, args.template, args.html) + + if not args.nopdf: + generate_pdf(html) + +if __name__ == "__main__": + main() |