This a system to generate PDF (via LaTeX), HTML, TXT, Sphinx, and Markdown resumes from a YAML file containing all of the resume content. It is partly inspired by Ming-Ho Yee's resume project. A single Python script performs the transformation using PyYAML to parse the data file(s) and Jinja2 to fill the data into templates.
The primary resume data is stored in resume.yml
. A second YAML file
resume-nonweb.yml
(not included in this repository) contains information
that should not be publicly available online (address, telephone number,
etc.). resume-nonweb.example.yml
is provided as an example. The Python
script can actually accept arbitrarily many YAML files and merge their data
together.
After parsing the YAML data files, the script applies the regex replacements in
config.yml
to the individual strings in the data to escape problematic
characters, apply simple markup, etc. config.yml
also contains configuration
for which delimiters to use for Jinja2 (because the default delimiters don't
work well for LaTeX) and the desired line endings (to enable DOS line endings in
the TXT output for those unfortunate MS Notepad users).
The resulting data is then applied to the various *.j2
templates to generate
the output. The LaTeX output is then compiled to a PDF.
The HTML output is bare-bones, intended for inclusion into a HTML-based blog with custom CSS. The Sphinx output is a reStructuredText file intended for inclusion into a Sphinx-based website with custom CSS. The Markdown output is intended for inclusion in a website with custom CSS.
To build everything, simply type:
make
The usage details for the script are:
usage: transform_resume.py [-h] [--config CONFIG] {latex,html,txt,sphinx,markdown} template output data [data ...] Render resume templates. positional arguments: {latex,html,txt,sphinx,markdown} Output file type. template Path to Jinja2 template file. output Desired output path. data Paths to YAML files with data. optional arguments: -h, --help show this help message and exit --config CONFIG Path to config YAML file. (default: config.yml)
- Python 3.x
- Jinja2
- PyYAML
- LaTeX (for PDF output)
See LICENSE.rst
.
I developed this project for my own personal use. If you have any changes that would be helpful for general use, please feel free to submit a pull request.