aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-08-03 15:23:58 +0200
committerneodarz <neodarz@neodarz.net>2019-08-03 15:42:40 +0200
commit46f2126c12abb69971b586be4e1548f37d50386a (patch)
tree836716028e9ddd7263e1ffdee3599987abcc977a /bin
downloadresumejson_converter-bdb5011fc920578cad8aa01e55a7b638c7abeb9b.tar.xz
resumejson_converter-bdb5011fc920578cad8aa01e55a7b638c7abeb9b.zip
Initial commitv0.1
Diffstat (limited to '')
-rwxr-xr-xbin/resumejson_converter30
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()