A compiler that compiles Markdown files into a resume PDF file, formatted in LaTeX.
Project description
Resume Compiler
A compiler that compiles Markdown files into a resume PDF file, formatted in LaTeX.
Resumes outputted by this compiler will follow the structure given by the "Jake's Resume" template.
Installation
The compiler is available as a Python package on PyPI. To install the compiler through pip, simply run the following terminal command.
pip install resumecompiler
Terminology
This section introduces several terms (in bold) used throughout this project and its documentation. The "Jake's Resume" template is used as an example.
A resume begins with a title stating the candidate's first and last name, e.g. Jake Ryan.
There may also be a subtitle, a brief line describing the candidate.
Below that is a contact list, which provides the candidate's contact details, e.g.
123-456-7890 | jake@su.edu | ... | github.com/jake
In a resume, all achievements, projects and skills are categorised into separate sections. Each section is marked with a heading, such as Education, Experience, Projects or Technical Skills.
There are 3 types of sections:
- A toolset section
- An organisational section
- A catalogue section
A toolset section contains a list of resume items, each of which includes:
- a subheading describing the achievement (e.g.
Gitlytics), - a toolset listing the tools involved (e.g.
Python, Flask, ...) - the time and duration thereof, and
- a description list, which is a collection of sentences detailing the achievement (e.g.
Developed a full-stack web application...).
A resume item in a toolset section is formatted like this:
Gitlytics | Python, Flask, React... June 2020 – Present
• Description list item #1
• Description list item #2
An organisational section also has a list of resume items. Each resume item in an organisational section contains:
- a subheading describing the achievement (e.g.
Undergraduate Research Assistant), - the time, organisation and location associated therewith, and
- a description list (e.g.
Developed a REST API using...).
A resume item in an organisational section is formatted like this:
Undergraduate Research Assistant June 2020 – Present
Texas A&M University College Station, TX
• Description list item #1
• Description list item #2
A catalogue section does not contain any resume items. Instead, it displays a simple unordered list, formatted like this:
• Languages: Java, Python, C/C++, SQL (Postgres), JavaScript, HTML/CSS, R
• Frameworks: React, Node.js, Flask, JUnit, WordPress, Material-UI, FastAPI
• Developer Tools: Git, Docker, TravisCI, Google Cloud Platform, VS Code, Visual Studio, PyCharm, IntelliJ, Eclipse
• Libraries: pandas, NumPy, Matplotlib
In the above example, the text before each colon (Languages, Frameworks, etc.) are called labels and are formatted in bold.
Syntax
Create a title, subtitle and contact list
Use an H1 line to create a title.
# Jake Ryan
Use a preformatted block to create a subtitle.
A brief subtitle
Use an unordered list to create a contact list. Contacts may include hyperlinks.
# Jake Ryan
- 123-456-7890
- jake@su.edu
- [resume-compiler.com](resume-compiler.com)
The title, subtitle and contact list must precede the first section.
Create an organisational section
Use an H2 heading to create a new section.
## Education
Add an H3 subheading for each resume item. Use an indented preformatted code block to add 3 lines of auxiliary information.
### Undergraduate Research Assistant
June 2020 - Present
Texas A&M University
College Station, TX
The subheading and auxiliary information will appear from left to right and from top to bottom in the compiled document.
Then, use an unordered list to create a description list.
### Undergraduate Research Assistant
June 2020 - Present
Texas A&M University
College Station, TX
- Description list item #1
- Description list item #2
Create a toolset section
Use an H2 heading to create a new section. To indicate that this is a toolset section, prefix the heading with an exclamation mark.
## !Projects
Add an H3 subheading for each resume item. Use an indented preformatted code block to add 2 lines of auxiliary information.
### Gitlytics
Python, Flask, React, PostgreSQL, Docker
June 2020 - Present
The subheading and auxiliary information will appear from left to right in the compiled document.
Then, use an unordered list to create a description list.
### Gitlytics
Python, Flask, React, PostgreSQL, Docker
June 2020 - Present
- Description list item #1
- Description list item #2
Create a catalogue section
Create a new section by adding an H2 heading. A catalogue section contains no resume items, so do not add any H3 subheadings here.
## Technical Skills
Create an unordered list. Each item in the unordered list may optionally begin with a label followed by a colon.
## Technical Skills
- Languages: Java, Python, ...
- Another label: Something else, ...
Labels are formatted in bold in the compiled document.
Comments
Any plain text that is not part of a title, contact list, heading, subheading or resume item (i.e. that when translated to HTML does not belong to a tag) will be ignored. This is analogous to comments in most programming languages.
Hide resume items
You can hide resume sections, resume items, description list items, or catalogue section items. A hidden element will not appear in the compiled document.
To hide a resume section or resume item, prefix its heading or subheading with a caret (^).
## ^Education
### ^Gitlytics
Python, Flask, React, PostgreSQL, Docker
June 2020 - Present
- Description list item #1
- Description list item #2
When you do this, the entire resume section or item (not just the heading or subheading) will disappear from the compiled document.
Similarly, to hide a description list item or catalogue section item, simply prefix that item with a caret.
- ^Description list item #1
- ^Languages: Java, Python, ...
On escape characters and LaTeX injections.
Some characters have special meaning in LaTeX and should be escaped using backslashes (\) when writing Markdown source code. See table below.
| Character | Escape sequence in Markdown |
|---|---|
& |
\& |
% |
\% |
$ |
\$ |
# |
\# in preformatted code blocks, \\\# otherwise |
_ |
\_ in preformatted code blocks, \\\_ otherwise |
{ |
\{ in preformatted code blocks, \\\{ otherwise |
} |
\} in preformatted code blocks, \\\} otherwise |
~ |
\textasciitilde |
^ |
\textasciicircum |
\ |
\textbackslash |
When necessary, it is possible to inject LaTeX code into Markdown source code (especially in preformatted code blocks). Note, however, that precautions should be taken and escape sequences should be used.
Compilation
To compile a markdown file in the source directory into a LaTeX file in the destination directory, import the class ResumeCompiler and create a ResumeCompiler instance with the source and destination directory paths as arguments. Then, run any one of the methods on the ResumeCompiler object:
ResumeCompiler.compile(src_file_path, font)compiles the file specified by the inputted path.ResumeCompiler.run(font)compiles all Markdown files in the source directory and saves the results in the destination directory, with each LaTeX file in a different subdirectory.ResumeCompiler.run_with_live_reload(font)runs a loop to continuously detect when a Markdown file in the source directory is created or saved. Whenever this happens, that file is compiled with outputs saved in the destination directory.
from resumecompiler import ResumeCompiler
compiler = ResumeCompiler("src", "dist")
compiler.run_with_live_reload()
Each of these methods includes an optional font parameter that determines the typeface used to create the PDF document. This parameter takes an instance of the enum class Font, which can be any of the following.
Font.COMPUTER_MODERNFont.TIMES_NEW_ROMANFont.FIRA_SANSFont.ROBOTOFont.NOTO_SANSFont.SOURCE_SANS_PROFont.CORMORANT_GARAMONDFont.CHARTER
The argument defaults to Times New Roman (Font.TIMES_NEW_ROMAN). See an example code snippet below.
from resumecompiler.Enums.Font import Font
from resumecompiler import ResumeCompiler
compiler = ResumeCompiler("example-src", "example-dist")
compiler.run_with_live_reload(font=Font.TIMES_NEW_ROMAN)
Accessing the Resume object
The compiler works by reading the contents of the input Markdown file and then creating a corresponding Resume object. To access this internal Resume object, use the function get_resume_object_from_markdown. The function takes the path to the Markdown source file as input.
resume = get_resume_object_from_markdown('example-src/example.md')
Future improvements
Future improvements with regard to more robust parsing and compilation:
- More user-friendly error handling
- More mature handling of escape characters and LaTeX injection
- UML visualisation of classes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resumecompiler-0.15.tar.gz.
File metadata
- Download URL: resumecompiler-0.15.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2744619e1d07e3a4b2b9be1b2f3221dece519258233d9a2d0458f66b93671b0
|
|
| MD5 |
202be360dd2366026f56d7bff7d2fb10
|
|
| BLAKE2b-256 |
fc5bc8989541f35a9043f319d015d7209c8745be848e9301bd4f982d3db8e226
|
File details
Details for the file resumecompiler-0.15-py3-none-any.whl.
File metadata
- Download URL: resumecompiler-0.15-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae37e7858b3bd433fa1fd08cccd9ba6c046a53175443c7a62d4122ee2468cb62
|
|
| MD5 |
8009c4b200206899db72e4d63f3259cb
|
|
| BLAKE2b-256 |
ddcfe1437a3b14e4e61b7bce898920b2b2181f2613592498715341df9314fd40
|