Skip to main content

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 will be used as an example.

  • Title. The candidate's first and last name, as displayed at the top of the resume, e.g. Jake Ryan.
  • Contact information. A list of the candidate's contact details, e.g. 123-456-7890 | jake@su.edu | ... | github.com/jake.
  • Section. In the resume, all achievements, experiences and projects (resume items) are classified into several categories. Each of these categories constitutes a section of the resultant document, such as Education, Experience, Projects or Technical Skills. As explained below, a section can be any one of the following:
    • a toolset section,
    • an organisational section, or
    • a catalogue section.
  • Heading. The text that marks the start of each section.
  • Resume item. An achievement, experiences or project as listed in a toolset or organisational section. (A catalogue section cannot contain any resume items.) A resume item contains:
    • A subheading that describes the achievement, e.g. Undergraduate Research Assistant.
    • A description list that offers brief details thereof, e.g. • Developed a REST API using....
    • Other auxiliary information detailing the relevant time, organisation and location, if needed.
  • Subheading. The text that marks the start of each resume item.
  • Description list. Each resume item ends with an optional list of sentences providing details to the achievement, experience or project. This is called the description list.
  • Toolset section. In some sections, resume items are formatted as follows, with the subheading and auxiliary information packed into one row. These resume items usually include information such as tools and skills relevant to the achievement, experience or project. These sections are called toolset sections.
Gitlytics | Python, Flask, React...     June 2020 – Present

• Description list item #1
• Description list item #2
  • Organisational section. In some sections, resume items are formatted like so, with the subheading and auxiliary information placed in a 2x2 grid. These sections are called organisational sections.
Undergraduate Research Assistant     June 2020 – Present
Texas A&M University                 College Station, TX

• Description list item #1
• Description list item #2
  • Catalogue section. A type of section that contains a simple unordered list, e.g. Technical skills. Each item in the unordered list may optionally begin with a label (e.g. Languages).

Syntax

Add a title

A title can be added using an H1 line.

# Jake Ryan

The title must precede the first section.

Add a contact list

A contact list can be added using an unordered list. The list may contain hyperlinks. If a contact list item contains both a hyperlink(s) and plain text, only the first hyperlink will be displayed.

# Jake Ryan
- 123-456-7890
- jake@su.edu
- [resume-compiler.com](resume-compiler.com)

A contact list must precede the first section.

Add an organisational section

Create a new section by adding an H2 heading.

## Education

For each resume item, create an H3 subheading. This is followed by an indented preformatted code block containing three lines of auxiliary information. These will appear from left to right and from top to bottom in the compiled document.

### Undergraduate Research Assistant 
    June 2020 - Present
    Texas A&M University
    College Station, TX

Add a description list by adding an unordered list afterwards.

### Undergraduate Research Assistant 
    June 2020 - Present
    Texas A&M University
    College Station, TX

- Description list item #1
- Description list item #2

Add a toolset section

Create a new section by adding an H2 heading. To indicate that this is a toolset section, prefix the heading with an exclamation mark.

## !Projects

For each resume item, create an H3 subheading. This is followed by an indented preformatted code block containing two lines of auxiliary information. These will appear from left to right in the compiled document.

### Gitlytics
    Python, Flask, React, PostgreSQL, Docker
    June 2020 - Present

Add a description list by adding an unordered list afterwards.

### Gitlytics
    Python, Flask, React, PostgreSQL, Docker
    June 2020 - Present

- Description list item #1
- Description list item #2

Add 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

Complete the catalogue section by adding an unordered list. Each item in the unordered list may optionally begin with a label (e.g. Languages), like so:

## Technical Skills

- Languages: Java, Python, ...
- Another label: Something else, ...

Add comments

Any 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 and treated as a comment.

Hide resume items

To hide a resume item in an organisational or toolset section, prefix its subheading with a caret (^).

For example, including the following resume item in a toolset section will have no effect on the final compiled PDF document.

### ^Gitlytics
    Python, Flask, React, PostgreSQL, Docker
    June 2020 - Present

- Description list item #1
- Description list item #2

Escape characters

Some characters have special meaning in LaTeX and should be escaped using backslashes (\) when writing Markdown source code.

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

LaTeX injections

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, install the resumecompiler package via pip (see the "Installation" section above) and import the class ResumeCompiler in a Python file.

from resumecompiler import ResumeCompiler

Create a ResumeCompiler instance with the source and destination directory paths as arguments. To execute the compilation process, 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_MODERN
  • Font.TIMES_NEW_ROMAN
  • Font.FIRA_SANS
  • Font.ROBOTO
  • Font.NOTO_SANS
  • Font.SOURCE_SANS_PRO
  • Font.CORMORANT_GARAMOND
  • Font.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)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resumecompiler-0.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resumecompiler-0.2-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file resumecompiler-0.2.tar.gz.

File metadata

  • Download URL: resumecompiler-0.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for resumecompiler-0.2.tar.gz
Algorithm Hash digest
SHA256 6598d13cba2e29e331dfc5e031fe4c26a23d0df9e80bd0c20ad61cf329184d68
MD5 643b4a149feb8bd17ad9a71a9765b614
BLAKE2b-256 1cba31069b59e3bf6f19e8019ac49171b7c53722150a1474778c31b27e1b4e73

See more details on using hashes here.

File details

Details for the file resumecompiler-0.2-py3-none-any.whl.

File metadata

  • Download URL: resumecompiler-0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for resumecompiler-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3a44a7ae14c81efa3c3d4b95be587ea6eb6446916998cd5651af0c2b87c31e
MD5 328f669d1a45feabc15bdac37f33c07b
BLAKE2b-256 4b69b0324b91000660b30d9f4830e3fca1100e6b5367c13891e6937459960afb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page