-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.py
59 lines (53 loc) · 1.3 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from resume import Resume
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--json",
type=str,
help="JSONResume file location",
default="resume.json"
)
parser.add_argument(
"--color",
type=str,
help="Color scheme of the resume",
default="green",
choices=['blue', 'green', 'red', 'orange', 'grey']
)
parser.add_argument(
"--style",
type=str,
help="Style of the resume",
default="fancy",
choices=['fancy', 'classic', 'casual']
)
parser.add_argument(
"--font",
type=str,
help="Roman or sans-serif font setting",
default="sans",
choices=['sans', 'roman']
)
parser.add_argument(
"--font_size",
type=str,
help="Font size (in pts)",
default="11",
choices=['10','11','12']
)
parser.add_argument(
"--paper_size",
type=str,
help="Paper size",
default="a4paper",
choices=['a4paper', 'a5paper', 'b5paper', 'letterpaper', 'legalpaper', 'executive-paper', 'landscape']
)
args = parser.parse_args()
res = Resume(args.style, args.color, args.font_size+"pt", args.paper_size, args.font).load_json(args.json)
print(res)
with open("resume.tex", "w") as output_file:
output_file.write(str(res))
os.system("latexmk -pdf -pv resume.tex")
os.system("latexmk -c")
#os.system("pdflatex resume.tex")