30 lines
899 B
Python
30 lines
899 B
Python
# Copyright Sage Vaillancourt 2021
|
|
|
|
import os
|
|
import subprocess
|
|
from dataclasses import dataClass
|
|
|
|
|
|
# latex /home/sage/Documents/latex/coverLetter/temp.tex'
|
|
# dvipdf /home/sage/Documents/latex/coverLetter/temp.dvi ~/Documents/SageVaillancourt_CoverLetter.pdf'
|
|
# rm -r /home/sage/Documents/latex/coverLetter/temp*'
|
|
# cp "$HOME/Documents/SageVaillancourt_CoverLetter.pdf" "$HOME/Documents/CoverLetters/.pdf"'
|
|
# qpdfview $HOME/Documents/SageVaillancourt_CoverLetter.pdf'
|
|
|
|
@dataclass
|
|
class CLData():
|
|
username: str
|
|
company: str
|
|
jobandpronoun: str
|
|
skilltypes: str
|
|
myskills: str
|
|
closingtext: str
|
|
body: str
|
|
|
|
def generate(unique):
|
|
template_dir = os.path.dirname(os.getcwd()) + '/undercover/writing_templates'
|
|
base_tex = template_dir + '/base.tex'
|
|
com = "pdflatex -jobname=outputs/" + unique + " " + base_tex
|
|
subprocess.run(['bash', '-c', com])
|
|
return base_tex
|