From 46f2126c12abb69971b586be4e1548f37d50386a Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 3 Aug 2019 15:23:58 +0200 Subject: Initial commit --- bin/resumejson_converter | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/resumejson_converter (limited to 'bin') 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() -- cgit v1.2.1