moved primary resume to a modular format
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-05-12 14:56:10 -06:00
parent dc619e9141
commit 361ae226d9
5 changed files with 94 additions and 26 deletions
+45 -11
View File
@@ -22,13 +22,55 @@ def main():
if not srcdir.is_dir():
return f'Error: "{srcdir}" is not a directory or does not exist'
filelist = list(srcdir.glob("*.md"))
# mk destdir if not exist
if not destdir.is_dir():
destdir.mkdir()
# process filelist
# process modular resume
srclist = (
"contact.md",
"summary.md",
"skills.md",
"projects.md",
"education.md",
"experience.md",
)
chunks = []
for md in srclist:
print("processing modular resumd")
file = Path.joinpath(srcdir, md)
with file.open(mode="r", encoding="utf-8") as f:
chunks.append(f.read())
mdsrc = "".join(chunks)
rawhtml = mdtohtml(mdsrc)
base_name = "resume-mod"
# pretty pdf
web_template = j2_env.get_template("resume-web.template")
web_html = web_template.render(name=name, content=rawhtml)
web_pdf_path = destdir / f"{base_name}-web.pdf"
htmltopdf(web_html, web_pdf_path)
# ats friendly pdf
ats_template = j2_env.get_template("resume-ats.template")
ats_html = ats_template.render(name=name, content=rawhtml)
ats_pdf_path = destdir / f"{base_name}-ats.pdf"
htmltopdf(ats_html, ats_pdf_path)
# generate web html with download bar
download_template = j2_env.get_template("download.template")
download_bar = download_template.render(
web_pdf=f"{base_name}-web.pdf", ats_pdf=f"{base_name}-ats.pdf"
)
pubhtml = web_template.render(name=name, content=rawhtml, download=download_bar)
# process full resume source files
filelist = list(srcdir.glob("*.md"))
filelist = [f for f in filelist if "resume" in f.stem]
for infile in filelist:
print(f"processing '{infile}'...")
@@ -52,14 +94,6 @@ def main():
ats_pdf_path = destdir / f"{base_name}-ats.pdf"
htmltopdf(ats_html, ats_pdf_path)
# generate web html with download bar
download_template = j2_env.get_template("download.template")
download_bar = download_template.render(
web_pdf=f"{base_name}-web.pdf", ats_pdf=f"{base_name}-ats.pdf"
)
pubhtml = web_template.render(name=name, content=rawhtml, download=download_bar)
html_path = destdir / f"{base_name}.html"
with html_path.open(mode="w", encoding="utf-8") as f:
f.write(pubhtml)