diff options
author | neodarz <neodarz@neodarz.net> | 2019-08-03 15:23:58 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-08-03 15:42:40 +0200 |
commit | 46f2126c12abb69971b586be4e1548f37d50386a (patch) | |
tree | 836716028e9ddd7263e1ffdee3599987abcc977a /bin | |
download | resumejson_converter-46f2126c12abb69971b586be4e1548f37d50386a.tar.xz resumejson_converter-46f2126c12abb69971b586be4e1548f37d50386a.zip |
Initial commitv0.1
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() |