This repository has been archived by the owner on Mar 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from waynr/implement-standard-latex-resume-temp…
…late Implement standard latex resume template
- Loading branch information
Showing
4 changed files
with
278 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
\documentclass[10pt]{article} %Sets the default text size to 11pt and class to article. | ||
|
||
\usepackage{multicol} | ||
\usepackage[colorlinks=true]{hyperref} | ||
|
||
\hoffset=0.0in | ||
\voffset=0.0in | ||
|
||
\textwidth=6.25in | ||
\textheight=9.0in | ||
|
||
\topmargin=0.0in | ||
|
||
\oddsidemargin=0.0in | ||
\evensidemargin=0.0in | ||
|
||
\marginparwidth=0.0in | ||
\marginparsep=0.0in | ||
|
||
\headheight=0pt | ||
\headsep=0pt | ||
|
||
\begin{document} | ||
\centerline{ | ||
\LARGE\textbf{ {{ basic.name }} } | ||
} | ||
|
||
{% set count=0 %} | ||
{% for each in ["address", "contact", "websites"] %} | ||
{% if each in basic %} | ||
set count=count+1 | ||
{% endif %} | ||
|
||
{% endfor %} | ||
|
||
{% if count > 0 %} | ||
\begin{multicols}{ {{count}} } | ||
{% if "address" in basic %} | ||
{% for line in basic.address %} | ||
\centerline{ {{line}} } | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if "contact" in basic and basic.contact|length > 0 %} | ||
\columnbreak | ||
{% if "phone" in basic.contact %} | ||
\centerline{ {{basic.contact.phone}} } | ||
{% endif %} | ||
{% if "email" in basic.contact %} | ||
\centerline{ | ||
\href{ mailto:{{basic.contact.email}} }{ {{basic.contact.email}} } | ||
} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if "websites" in basic and basic.websites|length > 0 %} | ||
\columnbreak | ||
{% for website in basic.websites %} | ||
\centerline{ | ||
\href{ {{website.url}} }{ {{website.text}} } | ||
} | ||
{% endfor %} | ||
{% endif %} | ||
\end{multicols} | ||
{% endif %} | ||
|
||
{% if objective is not none %} | ||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\nointerlineskip | ||
\centerline{\Large Objective} | ||
\smallskip | ||
|
||
{{ objective }} | ||
|
||
\bigskip | ||
{% endif %} | ||
|
||
{% if education is not none %} | ||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\nointerlineskip | ||
\centerline{\Large Education} | ||
\smallskip | ||
|
||
{% for school in education %} | ||
\centerline{\large\bf | ||
{{school.school}} | ||
\hfill | ||
{{school.startdate}} - {{school.enddate}} | ||
} | ||
\smallskip | ||
{% if ("degrees" in school and | ||
school.degrees|length > 0) %} | ||
{% for degree in school.degrees %} | ||
\noindent\textit{ {{degree}} }\\ | ||
{% endfor %} | ||
{% endif %} | ||
{% if ("achievements" in school and | ||
school.achievements|length > 0) %} | ||
{% for achievement in school.achievements %} | ||
\indent\textit{ {{achievement}} }\\ | ||
{% endfor %} | ||
{% endif %} | ||
{% if "gpa" in school %} | ||
\indent GPA: {{ school.gpa }}\\ | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if experience is not none %} | ||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\centerline{\Large Experience} | ||
\smallskip | ||
|
||
{% for experience in experiences %} | ||
\centerline{\large\bf | ||
{{experience.company}}: {{experience.title}} | ||
\hfill | ||
{{experience.startdate}} - {{experience.enddate}} | ||
} | ||
\begin{itemize} | ||
{% if experience.projects|length > 0 %} | ||
{% for project in experience.projects %} | ||
\item {{ project }} | ||
{% endfor %} | ||
{% endif %} | ||
\item {{experience}} | ||
\end{itemize} | ||
{% endfor %} | ||
|
||
{% endif %} | ||
|
||
{% if (skills is not none and | ||
skills|length > 0) %} | ||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\nointerlineskip | ||
\centerline{\Large Skills} | ||
|
||
\begin{multicols}{ {{category.columns}} } | ||
{% for category in skills %} | ||
\noindent{\large\bf {{category.category}} } | ||
\begin{itemize} | ||
{% for item in category.items %} | ||
\item {{item}} | ||
{% endfor %} | ||
\end{itemize} | ||
{% endfor %} | ||
\end{multicols} | ||
\bigskip | ||
{% endif %} | ||
|
||
{% if (activities is not none and | ||
activities|length > 0) %} | ||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\nointerlineskip | ||
\centerline{\Large Activities} | ||
{% for activity in activities %} | ||
\centerline{\large\bf | ||
{{ activity.name }} | ||
\hfill | ||
{{activity.startdate}} - {{activity.enddate}} | ||
} | ||
{% endfor %} | ||
\bigskip | ||
{% endif %} | ||
|
||
\vskip \medskipamount | ||
\leaders\vrule width \textwidth\vskip0.8pt | ||
\vskip \medskipamount | ||
\nointerlineskip | ||
\centerline{\Large References} | ||
{% if (references is not none and | ||
references|length > 0) %} | ||
{% for reference in references %} | ||
\centerline{\large\bf | ||
{{ reference.name }} | ||
\hfill | ||
{{ reference.info }} | ||
} | ||
{% endfor %} | ||
{% else %} | ||
\noindent{\bf Available on Request} | ||
{% endif %} | ||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
test_templates | ||
---------------------------------- | ||
Tests for jinja2 LaTeX resume template files. | ||
""" | ||
|
||
import pkg_resources | ||
|
||
from jinja2 import Environment | ||
|
||
|
||
def test_standard_template_exists(): | ||
""" | ||
Validate that the standard LaTeX template is available through pkg_resources | ||
at the expected location. | ||
""" | ||
assert pkg_resources.resource_exists('pyresume', | ||
'templates/standard.tex') | ||
|
||
|
||
def test_standard_template_is_valid_jinja2_format(): | ||
""" | ||
Validate that the standard LaTeX template is well-formed as far as Jinja2 is | ||
concerned. | ||
""" | ||
env = Environment() | ||
template_string = pkg_resources.resource_string('pyresume', | ||
'templates/standard.tex').decode() | ||
env.parse(template_string) |