Merge branch 'main' into jpg/mastodon

This commit is contained in:
Jeffrey Goldberg 2023-11-29 17:51:48 -06:00
commit 9d4299adbb
14 changed files with 194 additions and 179 deletions

View File

@ -6,7 +6,7 @@ on:
pull_request: pull_request:
branches: ["main"] branches: ["main"]
release: release:
types: ["published", "edited", "created", "released"] types: ["published"]
jobs: jobs:
lint: lint:

Binary file not shown.

View File

@ -191,20 +191,28 @@ design:
- Work Experience - Work Experience
- My Other Custom Section - My Other Custom Section
show_last_updated_date: True show_last_updated_date: True
text_alignment: justified
header_font_size: 30 pt
margins: margins:
page: page:
top: 1.35 cm top: 2 cm
bottom: 1.35 cm bottom: 2 cm
left: 1.35 cm left: 1.24 cm
right: 1.35 cm right: 1.24 cm
section_title: section_title:
top: 0.13 cm top: 0.2 cm
bottom: 0.13 cm bottom: 0.2 cm
entry_area: entry_area:
left_and_right: 0.2 cm left_and_right: 0.2 cm
vertical_between: 0.12 cm vertical_between: 0.2 cm
highlights_area: highlights_area:
top: 0.12 cm top: 0.10 cm
left: 0.6 cm left: 0.4 cm
vertical_between_bullet_points: 0.07 cm vertical_between_bullet_points: 0.10 cm
header:
vertical_between_name_and_connections: 0.2 cm
bottom: 0.2 cm

View File

@ -1,7 +1,7 @@
[project] [project]
name = 'rendercv' name = 'rendercv'
description = 'LaTeX CV generator from a YAML/JSON file' description = 'LaTeX CV generator from a YAML/JSON file'
version = '0.8' version = '0.10'
authors = [{ name = 'Sina Atalay' }] authors = [{ name = 'Sina Atalay' }]
requires-python = '>=3.10' requires-python = '>=3.10'
readme = "README.md" readme = "README.md"

View File

@ -340,22 +340,22 @@ class ClassicThemePageMargins(BaseModel):
"""This class stores the margins of pages for the classic theme.""" """This class stores the margins of pages for the classic theme."""
top: LaTeXDimension = Field( top: LaTeXDimension = Field(
default="1.35 cm", default="2 cm",
title="Top Margin", title="Top Margin",
description="The top margin of the page with units.", description="The top margin of the page with units.",
) )
bottom: LaTeXDimension = Field( bottom: LaTeXDimension = Field(
default="1.35 cm", default="2 cm",
title="Bottom Margin", title="Bottom Margin",
description="The bottom margin of the page with units.", description="The bottom margin of the page with units.",
) )
left: LaTeXDimension = Field( left: LaTeXDimension = Field(
default="1.35 cm", default="1.24 cm",
title="Left Margin", title="Left Margin",
description="The left margin of the page with units.", description="The left margin of the page with units.",
) )
right: LaTeXDimension = Field( right: LaTeXDimension = Field(
default="1.35 cm", default="1.24 cm",
title="Right Margin", title="Right Margin",
description="The right margin of the page with units.", description="The right margin of the page with units.",
) )
@ -365,12 +365,12 @@ class ClassicThemeSectionTitleMargins(BaseModel):
"""This class stores the margins of section titles for the classic theme.""" """This class stores the margins of section titles for the classic theme."""
top: LaTeXDimension = Field( top: LaTeXDimension = Field(
default="0.13 cm", default="0.2 cm",
title="Top Margin", title="Top Margin",
description="The top margin of section titles.", description="The top margin of section titles.",
) )
bottom: LaTeXDimension = Field( bottom: LaTeXDimension = Field(
default="0.13 cm", default="0.2 cm",
title="Bottom Margin", title="Bottom Margin",
description="The bottom margin of section titles.", description="The bottom margin of section titles.",
) )
@ -401,17 +401,17 @@ class ClassicThemeHighlightsAreaMargins(BaseModel):
"""This class stores the margins of highlights areas for the classic theme.""" """This class stores the margins of highlights areas for the classic theme."""
top: LaTeXDimension = Field( top: LaTeXDimension = Field(
default="0.12 cm", default="0.10 cm",
title="Top Margin", title="Top Margin",
description="The top margin of highlights areas.", description="The top margin of highlights areas.",
) )
left: LaTeXDimension = Field( left: LaTeXDimension = Field(
default="0.6 cm", default="0.4 cm",
title="Left Margin", title="Left Margin",
description="The left margin of highlights areas.", description="The left margin of highlights areas.",
) )
vertical_between_bullet_points: LaTeXDimension = Field( vertical_between_bullet_points: LaTeXDimension = Field(
default="0.07 cm", default="0.10 cm",
title="Vertical Margin Between Bullet Points", title="Vertical Margin Between Bullet Points",
description="The vertical margin between bullet points.", description="The vertical margin between bullet points.",
) )

View File

@ -127,20 +127,11 @@ def make_it_something(
if match_str is not None and not isinstance(match_str, str): if match_str is not None and not isinstance(match_str, str):
raise ValueError("The string to match should be a string!") raise ValueError("The string to match should be a string!")
if something == "make_it_bold":
keyword = "textbf"
elif something == "make_it_underlined":
keyword = "underline"
elif something == "make_it_italic":
keyword = "textit"
else:
raise ValueError(f"Unknown keyword {something}!")
if match_str is None: if match_str is None:
return f"\\{keyword}{{{value}}}" return f"\\{something}{{{value}}}"
if match_str in value: if match_str in value:
value = value.replace(match_str, f"\\{keyword}{{{match_str}}}") value = value.replace(match_str, f"\\{something}{{{match_str}}}")
return value return value
else: else:
return value return value
@ -154,7 +145,7 @@ def make_it_bold(value: str, match_str: Optional[str] = None) -> str:
Example: Example:
```python ```python
make_it_bold_if("Hello World!", "Hello") make_it_bold("Hello World!", "Hello")
``` ```
will return: will return:
@ -165,7 +156,7 @@ def make_it_bold(value: str, match_str: Optional[str] = None) -> str:
value (str): The string to make bold. value (str): The string to make bold.
match_str (str): The string to match. match_str (str): The string to match.
""" """
return make_it_something(value, "make_it_bold", match_str) return make_it_something(value, "textbf", match_str)
def make_it_underlined(value: str, match_str: Optional[str] = None) -> str: def make_it_underlined(value: str, match_str: Optional[str] = None) -> str:
@ -176,7 +167,7 @@ def make_it_underlined(value: str, match_str: Optional[str] = None) -> str:
Example: Example:
```python ```python
make_it_underlined_if("Hello World!", "Hello") make_it_underlined("Hello World!", "Hello")
``` ```
will return: will return:
@ -187,7 +178,7 @@ def make_it_underlined(value: str, match_str: Optional[str] = None) -> str:
value (str): The string to make underlined. value (str): The string to make underlined.
match_str (str): The string to match. match_str (str): The string to match.
""" """
return make_it_something(value, "make_it_underlined", match_str) return make_it_something(value, "underline", match_str)
def make_it_italic(value: str, match_str: Optional[str] = None) -> str: def make_it_italic(value: str, match_str: Optional[str] = None) -> str:
@ -198,7 +189,7 @@ def make_it_italic(value: str, match_str: Optional[str] = None) -> str:
Example: Example:
```python ```python
make_it_italic_if("Hello World!", "Hello") make_it_italic("Hello World!", "Hello")
``` ```
will return: will return:
@ -209,7 +200,29 @@ def make_it_italic(value: str, match_str: Optional[str] = None) -> str:
value (str): The string to make italic. value (str): The string to make italic.
match_str (str): The string to match. match_str (str): The string to match.
""" """
return make_it_something(value, "make_it_italic", match_str) return make_it_something(value, "textit", match_str)
def make_it_nolinebreak(value: str, match_str: Optional[str] = None) -> str:
"""Make the matched parts of the string non line breakable. If the match_str is
None, the whole string will be made nonbreakable.
This function is used as a Jinja2 filter.
Example:
```python
make_it_nolinebreak("Hello World!", "Hello")
```
will return:
`#!python "\\mbox{Hello} World!"`
Args:
value (str): The string to disable line breaks.
match_str (str): The string to match.
"""
return make_it_something(value, "mbox", match_str)
def abbreviate_name(name: list[str]) -> str: def abbreviate_name(name: list[str]) -> str:
@ -239,32 +252,6 @@ def abbreviate_name(name: list[str]) -> str:
return abbreviated_name return abbreviated_name
def abbreviate_names(names: list[str]) -> str:
"""Abbreviate a list of names by keeping the first letters of the first names.
This function is used as a Jinja2 filter.
Example:
```python
abbreviate_names(["John Doe", "Jane Atalay"])
```
will return:
`#!python ["J. Doe", "J. Atalay"]`
Args:
names (list[str]): The names to abbreviate.
Returns:
str: The list of abbreviated names.
"""
abbreviated_names = []
for name in names:
abbreviated_names.append(abbreviate_name(name))
return abbreviated_names
def divide_length_by(length: str, divider: float) -> str: def divide_length_by(length: str, divider: float) -> str:
r"""Divide a length by a number. r"""Divide a length by a number.
@ -278,14 +265,14 @@ def divide_length_by(length: str, divider: float) -> str:
def get_today() -> str: def get_today() -> str:
"""Return today's date. """Return today's date in the format of "Month, Year".
Returns: Returns:
str: Today's date. str: Today's date.
""" """
today = date.today() today = date.today()
return today.strftime("%B %d, %Y") return today.strftime("%B, %Y")
def get_path_to_font_directory(font_name: str) -> str: def get_path_to_font_directory(font_name: str) -> str:
@ -334,9 +321,10 @@ def render_template(data: RenderCVDataModel, output_path: Optional[str] = None)
environment.filters["make_it_bold"] = make_it_bold environment.filters["make_it_bold"] = make_it_bold
environment.filters["make_it_underlined"] = make_it_underlined environment.filters["make_it_underlined"] = make_it_underlined
environment.filters["make_it_italic"] = make_it_italic environment.filters["make_it_italic"] = make_it_italic
environment.filters["make_it_nolinebreak"] = make_it_nolinebreak
environment.filters["make_it_something"] = make_it_something
environment.filters["divide_length_by"] = divide_length_by environment.filters["divide_length_by"] = divide_length_by
environment.filters["abbreviate_name"] = abbreviate_name environment.filters["abbreviate_name"] = abbreviate_name
environment.filters["abbreviate_names"] = abbreviate_names
# load the template: # load the template:
template = environment.get_template(f"{theme}.tex.j2") template = environment.get_template(f"{theme}.tex.j2")

View File

@ -119,7 +119,7 @@
\LenToUnit{\paperwidth-<<theme_options.margins.page.right>>-<<theme_options.margins.entry_area.left_and_right>>+0.05cm}, \LenToUnit{\paperwidth-<<theme_options.margins.page.right>>-<<theme_options.margins.entry_area.left_and_right>>+0.05cm},
\LenToUnit{\paperheight-<<theme_options.margins.page.top|divide_length_by(2)>>} \LenToUnit{\paperheight-<<theme_options.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{ ){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\textit{Last updated on <<today>>}\hspace{\widthof{Last updated on <<today>>}} \small\color{gray}\textit{Last updated in <<today>>}\hspace{\widthof{Last updated in <<today>>}}
}}}% }}}%
}% }%
}% }%

View File

@ -82,7 +82,7 @@
\vspace{<<theme_options.margins.highlights_area.vertical_between_bullet_points>>} \vspace{<<theme_options.margins.highlights_area.vertical_between_bullet_points>>}
<<authors|abbreviate_names|map("replace", " ", " \\nolinebreak ")|join(", ")|make_it_bold(cv.name|abbreviate_name)|make_it_italic(cv.name|abbreviate_name)>> <<authors|map("abbreviate_name")|map("make_it_nolinebreak")|join(", ")|make_it_bold(cv.name|abbreviate_name)|make_it_italic(cv.name|abbreviate_name)>>
\vspace{<<theme_options.margins.highlights_area.vertical_between_bullet_points>>} \vspace{<<theme_options.margins.highlights_area.vertical_between_bullet_points>>}

View File

@ -191,20 +191,28 @@ design:
- Work Experience - Work Experience
- My Other Custom Section - My Other Custom Section
show_last_updated_date: True show_last_updated_date: True
text_alignment: justified
header_font_size: 30 pt
margins: margins:
page: page:
top: 1.35 cm top: 2 cm
bottom: 1.35 cm bottom: 2 cm
left: 1.35 cm left: 1.24 cm
right: 1.35 cm right: 1.24 cm
section_title: section_title:
top: 0.13 cm top: 0.2 cm
bottom: 0.13 cm bottom: 0.2 cm
entry_area: entry_area:
left_and_right: 0.2 cm left_and_right: 0.2 cm
vertical_between: 0.12 cm vertical_between: 0.2 cm
highlights_area: highlights_area:
top: 0.12 cm top: 0.10 cm
left: 0.6 cm left: 0.4 cm
vertical_between_bullet_points: 0.07 cm vertical_between_bullet_points: 0.10 cm
header:
vertical_between_name_and_connections: 0.2 cm
bottom: 0.2 cm

View File

@ -45,21 +45,21 @@
"ClassicThemeHighlightsAreaMargins": { "ClassicThemeHighlightsAreaMargins": {
"properties": { "properties": {
"top": { "top": {
"default": "0.12 cm", "default": "0.10 cm",
"description": "The top margin of highlights areas.", "description": "The top margin of highlights areas.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Top Margin", "title": "Top Margin",
"type": "string" "type": "string"
}, },
"left": { "left": {
"default": "0.6 cm", "default": "0.4 cm",
"description": "The left margin of highlights areas.", "description": "The left margin of highlights areas.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Left Margin", "title": "Left Margin",
"type": "string" "type": "string"
}, },
"vertical_between_bullet_points": { "vertical_between_bullet_points": {
"default": "0.07 cm", "default": "0.10 cm",
"description": "The vertical margin between bullet points.", "description": "The vertical margin between bullet points.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Vertical Margin Between Bullet Points", "title": "Vertical Margin Between Bullet Points",
@ -79,10 +79,10 @@
} }
], ],
"default": { "default": {
"bottom": "1.35 cm", "bottom": "2 cm",
"left": "1.35 cm", "left": "1.24 cm",
"right": "1.35 cm", "right": "1.24 cm",
"top": "1.35 cm" "top": "2 cm"
}, },
"description": "Page margins for the classic theme.", "description": "Page margins for the classic theme.",
"title": "Page Margins" "title": "Page Margins"
@ -94,8 +94,8 @@
} }
], ],
"default": { "default": {
"bottom": "0.13 cm", "bottom": "0.2 cm",
"top": "0.13 cm" "top": "0.2 cm"
}, },
"description": "Section title margins for the classic theme.", "description": "Section title margins for the classic theme.",
"title": "Section Title Margins" "title": "Section Title Margins"
@ -120,9 +120,9 @@
} }
], ],
"default": { "default": {
"left": "0.6 cm", "left": "0.4 cm",
"top": "0.12 cm", "top": "0.10 cm",
"vertical_between_bullet_points": "0.07 cm" "vertical_between_bullet_points": "0.10 cm"
}, },
"description": "Highlights area margins for the classic theme.", "description": "Highlights area margins for the classic theme.",
"title": "Highlights Area Margins" "title": "Highlights Area Margins"
@ -215,19 +215,19 @@
"vertical_between_name_and_connections": "0.2 cm" "vertical_between_name_and_connections": "0.2 cm"
}, },
"highlights_area": { "highlights_area": {
"left": "0.6 cm", "left": "0.4 cm",
"top": "0.12 cm", "top": "0.10 cm",
"vertical_between_bullet_points": "0.07 cm" "vertical_between_bullet_points": "0.10 cm"
}, },
"page": { "page": {
"bottom": "1.35 cm", "bottom": "2 cm",
"left": "1.35 cm", "left": "1.24 cm",
"right": "1.35 cm", "right": "1.24 cm",
"top": "1.35 cm" "top": "2 cm"
}, },
"section_title": { "section_title": {
"bottom": "0.13 cm", "bottom": "0.2 cm",
"top": "0.13 cm" "top": "0.2 cm"
} }
}, },
"description": "Page, section title, entry field, and highlights field margins.", "description": "Page, section title, entry field, and highlights field margins.",
@ -241,28 +241,28 @@
"ClassicThemePageMargins": { "ClassicThemePageMargins": {
"properties": { "properties": {
"top": { "top": {
"default": "1.35 cm", "default": "2 cm",
"description": "The top margin of the page with units.", "description": "The top margin of the page with units.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Top Margin", "title": "Top Margin",
"type": "string" "type": "string"
}, },
"bottom": { "bottom": {
"default": "1.35 cm", "default": "2 cm",
"description": "The bottom margin of the page with units.", "description": "The bottom margin of the page with units.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Bottom Margin", "title": "Bottom Margin",
"type": "string" "type": "string"
}, },
"left": { "left": {
"default": "1.35 cm", "default": "1.24 cm",
"description": "The left margin of the page with units.", "description": "The left margin of the page with units.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Left Margin", "title": "Left Margin",
"type": "string" "type": "string"
}, },
"right": { "right": {
"default": "1.35 cm", "default": "1.24 cm",
"description": "The right margin of the page with units.", "description": "The right margin of the page with units.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Right Margin", "title": "Right Margin",
@ -276,14 +276,14 @@
"ClassicThemeSectionTitleMargins": { "ClassicThemeSectionTitleMargins": {
"properties": { "properties": {
"top": { "top": {
"default": "0.13 cm", "default": "0.2 cm",
"description": "The top margin of section titles.", "description": "The top margin of section titles.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Top Margin", "title": "Top Margin",
"type": "string" "type": "string"
}, },
"bottom": { "bottom": {
"default": "0.13 cm", "default": "0.2 cm",
"description": "The bottom margin of section titles.", "description": "The bottom margin of section titles.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Bottom Margin", "title": "Bottom Margin",
@ -1632,19 +1632,19 @@
"vertical_between_name_and_connections": "0.2 cm" "vertical_between_name_and_connections": "0.2 cm"
}, },
"highlights_area": { "highlights_area": {
"left": "0.6 cm", "left": "0.4 cm",
"top": "0.12 cm", "top": "0.10 cm",
"vertical_between_bullet_points": "0.07 cm" "vertical_between_bullet_points": "0.10 cm"
}, },
"page": { "page": {
"bottom": "1.35 cm", "bottom": "2 cm",
"left": "1.35 cm", "left": "1.24 cm",
"right": "1.35 cm", "right": "1.24 cm",
"top": "1.35 cm" "top": "2 cm"
}, },
"section_title": { "section_title": {
"bottom": "0.13 cm", "bottom": "0.2 cm",
"top": "0.13 cm" "top": "0.2 cm"
} }
}, },
"primary_color": "#004f90", "primary_color": "#004f90",

View File

@ -4,11 +4,11 @@
% Packages: % Packages:
\usepackage[ \usepackage[
ignoreheadfoot, % set margins without considering header and footer ignoreheadfoot, % set margins without considering header and footer
top=1.35 cm, % seperation between body and page edge from the top top=2 cm, % seperation between body and page edge from the top
bottom=1.35 cm, % seperation between body and page edge from the bottom bottom=2 cm, % seperation between body and page edge from the bottom
left=1.35 cm, % seperation between body and page edge from the left left=1.24 cm, % seperation between body and page edge from the left
right=1.35 cm, % seperation between body and page edge from the right right=1.24 cm, % seperation between body and page edge from the right
footskip=0.675 cm, % seperation between body and footer footskip=1.0 cm, % seperation between body and footer
% showframe % for debugging % showframe % for debugging
]{geometry} % for adjusting page geometry ]{geometry} % for adjusting page geometry
\usepackage{fontspec} % for loading fonts \usepackage{fontspec} % for loading fonts
@ -68,10 +68,10 @@
0pt 0pt
}{ }{
% top space: % top space:
0.13 cm 0.2 cm
}{ }{
% bottom space: % bottom space:
0.13 cm 0.2 cm
} % section title spacing } % section title spacing
\newcolumntype{L}[1]{ \newcolumntype{L}[1]{
@ -81,17 +81,17 @@
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % right-aligned fixed width column type } % right-aligned fixed width column type
\newcolumntype{K}[1]{ \newcolumntype{K}[1]{
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}X >{\let\newline\\\arraybackslash\hspace{0pt}}X
} % left-aligned flexible width column type } % justified flexible width column type
\setlength\tabcolsep{-1.5pt} % no space between columns \setlength\tabcolsep{-1.5pt} % no space between columns
\newenvironment{highlights}{ \newenvironment{highlights}{
\begin{itemize}[ \begin{itemize}[
topsep=0pt, topsep=0pt,
parsep=0.07 cm, parsep=0.10 cm,
partopsep=0pt, partopsep=0pt,
itemsep=0pt, itemsep=0pt,
after=\vspace{-1\baselineskip}, after=\vspace{-1\baselineskip},
leftmargin=0.6 cm + 3pt leftmargin=0.4 cm + 3pt
] ]
}{ }{
\end{itemize} \end{itemize}
@ -106,10 +106,10 @@
\newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>} \newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>}
\AddToShipoutPictureFG*{% Add <stuff> to current page foreground \AddToShipoutPictureFG*{% Add <stuff> to current page foreground
\put( \put(
\LenToUnit{\paperwidth-1.35 cm-0.2 cm+0.05cm}, \LenToUnit{\paperwidth-1.24 cm-0.2 cm+0.05cm},
\LenToUnit{\paperheight-0.675 cm} \LenToUnit{\paperheight-1.0 cm}
){\vtop{{\null}\makebox[0pt][c]{ ){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\textit{Last updated on November 27, 2023}\hspace{\widthof{Last updated on November 27, 2023}} \small\color{gray}\textit{Last updated in November, 2023}\hspace{\widthof{Last updated in November, 2023}}
}}}% }}}%
}% }%
}% }%
@ -147,7 +147,6 @@
\section{Summary} \section{Summary}
{ {
\raggedright
\setlength{\leftskip}{0.2 cm} \setlength{\leftskip}{0.2 cm}
\setlength{\rightskip}{0.2 cm} \setlength{\rightskip}{0.2 cm}
@ -164,7 +163,7 @@
\textbf{BS} \textbf{BS}
& &
\textbf{My University}, Mechanical Engineering \textbf{My University}, Mechanical Engineering
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item GPA: 3.99/4.00 (\href{https://example.com/}{Transcript}) \item GPA: 3.99/4.00 (\href{https://example.com/}{Transcript})
\item Class rank: 1 of 62 \hspace*{-0.2cm} \item Class rank: 1 of 62 \hspace*{-0.2cm}
@ -174,12 +173,12 @@
Sept. 2017 to Jan. 2023 Sept. 2017 to Jan. 2023
\end{tabularx} \end{tabularx}
\vspace{0.12 cm} \vspace{0.2 cm}
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{L{0.85cm} K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{L{0.85cm} K{0.2 cm} R{3.6 cm}}
\textbf{} \textbf{}
& &
\textbf{The University of Texas at Austin}, Mechanical Engineering, Student Exchange Program \textbf{The University of Texas at Austin}, Mechanical Engineering, Student Exchange Program
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item GPA: 4.00/4.00 (\href{https://example.com/}{Transcript}) \hspace*{-0.2cm} \item GPA: 4.00/4.00 (\href{https://example.com/}{Transcript}) \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -194,7 +193,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{CERN}, Mechanical Engineer \textbf{CERN}, Mechanical Engineer
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item CERN is a research organization that operates the world's largest and most powerful particle accelerator. \item CERN is a research organization that operates the world's largest and most powerful particle accelerator.
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@ -206,10 +205,10 @@
10 months 10 months
\end{tabularx} \end{tabularx}
\vspace{0.12 cm} \vspace{0.2 cm}
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{AmIACompany}, Summer Intern \textbf{AmIACompany}, Summer Intern
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item AmIACompany is a technology company that provides web-based engineering applications that enable the simulation and optimization of products and manufacturing tools. \item AmIACompany is a technology company that provides web-based engineering applications that enable the simulation and optimization of products and manufacturing tools.
\item Modeled and simulated a metal-forming process deep drawing using finite element analysis with open-source software called CalculiX. \hspace*{-0.2cm} \item Modeled and simulated a metal-forming process deep drawing using finite element analysis with open-source software called CalculiX. \hspace*{-0.2cm}
@ -226,7 +225,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Design and Construction of a Robot}, \href{https://example.com/}{view on my website} \textbf{Design and Construction of a Robot}, \href{https://example.com/}{view on my website}
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item Designed and constructed a controllable robot that measures a car's torque and power output at different speeds for my senior design project. \hspace*{-0.2cm} \item Designed and constructed a controllable robot that measures a car's torque and power output at different speeds for my senior design project. \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -235,10 +234,10 @@
Fall 2022 Fall 2022
\end{tabularx} \end{tabularx}
\vspace{0.12 cm} \vspace{0.2 cm}
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Design and Construction of an Another Robot}, \href{https://example.com/}{view on my website} \textbf{Design and Construction of an Another Robot}, \href{https://example.com/}{view on my website}
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item Designed, built, and programmed a microcontroller-based device that plays a guitar with DC motors as part of a mechatronics course term project. \hspace*{-0.2cm} \item Designed, built, and programmed a microcontroller-based device that plays a guitar with DC motors as part of a mechatronics course term project. \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -253,7 +252,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Machine Learning by Stanford University}, \href{https://example.com/}{Certificate} \textbf{Machine Learning by Stanford University}, \href{https://example.com/}{Certificate}
\vspace{0.12 cm} \vspace{0.10 cm}
& &
Sept. 2022 Sept. 2022
\end{tabularx} \end{tabularx}
@ -264,7 +263,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Ray Tracing in C++}, \href{https://example.com/}{view on my website} \textbf{Ray Tracing in C++}, \href{https://example.com/}{view on my website}
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item Coded a ray tracer in C++ that can render scenes with multiple light sources, spheres, and planes with reflection and refraction properties. \hspace*{-0.2cm} \item Coded a ray tracer in C++ that can render scenes with multiple light sources, spheres, and planes with reflection and refraction properties. \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -276,7 +275,7 @@
\section{Skills} \section{Skills}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -284,8 +283,8 @@
\par\endgroup \par\endgroup
\vspace{0.12 cm} \vspace{0.2 cm}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -293,8 +292,8 @@
\par\endgroup \par\endgroup
\vspace{0.12 cm} \vspace{0.2 cm}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -302,8 +301,8 @@
\par\endgroup \par\endgroup
\vspace{0.12 cm} \vspace{0.2 cm}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -315,7 +314,7 @@
\section{Test Scores} \section{Test Scores}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -323,8 +322,8 @@
\par\endgroup \par\endgroup
\vspace{0.12 cm} \vspace{0.2 cm}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -338,7 +337,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Dumanlikiz Skiing Club}, Co-founder / Skiing Instructor \textbf{Dumanlikiz Skiing Club}, Co-founder / Skiing Instructor
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item Taught skiing during winters as a certified skiing instructor. \hspace*{-0.2cm} \item Taught skiing during winters as a certified skiing instructor. \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -354,11 +353,11 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Phononic band gaps induced by inertial amplification in periodic media} \textbf{Phononic band gaps induced by inertial amplification in periodic media}
\vspace{0.07 cm} \vspace{0.10 cm}
A. \nolinebreak 1, J. \nolinebreak Doe, A. \nolinebreak 3 \mbox{A. 1}, \mbox{\textbf{\textit{J. Doe}}}, \mbox{A. 3}
\vspace{0.07 cm} \vspace{0.10 cm}
\href{https://doi.org/10.1103/PhysRevB.76.054309}{10.1103/PhysRevB.76.054309} (Physical Review B) \href{https://doi.org/10.1103/PhysRevB.76.054309}{10.1103/PhysRevB.76.054309} (Physical Review B)
& &
@ -370,7 +369,7 @@
\section{My Custom Section} \section{My Custom Section}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -378,8 +377,8 @@
\par\endgroup \par\endgroup
\vspace{0.12 cm} \vspace{0.2 cm}
\begingroup\raggedright \leftskip=0.2 cm \begingroup \leftskip=0.2 cm
\advance\csname @rightskip\endcsname 0.2 cm \advance\csname @rightskip\endcsname 0.2 cm
\advance\rightskip 0.2 cm \advance\rightskip 0.2 cm
@ -395,7 +394,7 @@
\textbf{HA} \textbf{HA}
& &
\textbf{Hop!}, Hop! \textbf{Hop!}, Hop!
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item There are only five types of entries: \textit{EducationEntry}, \textit{ExperienceEntry}, \textit{NormalEntry}, \textit{OneLineEntry}, and \textit{PublicationEntry}. \item There are only five types of entries: \textit{EducationEntry}, \textit{ExperienceEntry}, \textit{NormalEntry}, \textit{OneLineEntry}, and \textit{PublicationEntry}.
\item This is an EducationEntry! \hspace*{-0.2cm} \item This is an EducationEntry! \hspace*{-0.2cm}
@ -411,7 +410,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm} R{3.6 cm}}
\textbf{Hop!}, Hop! \textbf{Hop!}, Hop!
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item I think this is really working. This is an \textit{ExperienceEntry}! \hspace*{-0.2cm} \item I think this is really working. This is an \textit{ExperienceEntry}! \hspace*{-0.2cm}
\end{highlights} \end{highlights}
@ -426,7 +425,7 @@
\begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm}} \begin{tabularx}{\textwidth-0.4 cm-0.13cm}{K{0.2 cm}}
\textbf{This is a normal entry!}, \href{https://example.com/}{My Link Text} \textbf{This is a normal entry!}, \href{https://example.com/}{My Link Text}
\vspace{0.12 cm} \vspace{0.10 cm}
\begin{highlights} \begin{highlights}
\item You don't have to specify a \textit{date} or \textbf{location} every time. \item You don't have to specify a \textit{date} or \textbf{location} every time.
\item You can use \textit{Markdown} in the \textbf{highlights}! \item You can use \textit{Markdown} in the \textbf{highlights}!

View File

@ -191,20 +191,28 @@ design:
- Work Experience - Work Experience
- My Other Custom Section - My Other Custom Section
show_last_updated_date: True show_last_updated_date: True
text_alignment: justified
header_font_size: 30 pt
margins: margins:
page: page:
top: 1.35 cm top: 2 cm
bottom: 1.35 cm bottom: 2 cm
left: 1.35 cm left: 1.24 cm
right: 1.35 cm right: 1.24 cm
section_title: section_title:
top: 0.13 cm top: 0.2 cm
bottom: 0.13 cm bottom: 0.2 cm
entry_area: entry_area:
left_and_right: 0.2 cm left_and_right: 0.2 cm
vertical_between: 0.12 cm vertical_between: 0.2 cm
highlights_area: highlights_area:
top: 0.12 cm top: 0.10 cm
left: 0.6 cm left: 0.4 cm
vertical_between_bullet_points: 0.07 cm vertical_between_bullet_points: 0.10 cm
header:
vertical_between_name_and_connections: 0.2 cm
bottom: 0.2 cm

View File

@ -95,10 +95,14 @@ class TestRendering(unittest.TestCase):
def test_make_it_something(self): def test_make_it_something(self):
# invalid input: # invalid input:
input = "test" input = "test"
keyword = "invalid keyword" something = "haha"
with self.subTest(msg="invalid keyword"): result = rendering.make_it_something(input, something)
with self.assertRaises(ValueError): with self.subTest(msg="match_str is none"):
rendering.make_it_something(input, keyword) self.assertEqual(result, "\\haha{test}")
result = rendering.make_it_something(input, something, match_str="te")
with self.subTest(msg="match_str is not none"):
self.assertEqual(result, "\\haha{te}st")
def test_make_it_bold(self): def test_make_it_bold(self):
input = "some text" input = "some text"
@ -184,7 +188,7 @@ class TestRendering(unittest.TestCase):
self.assertEqual(rendering.divide_length_by(length, divider), exp) self.assertEqual(rendering.divide_length_by(length, divider), exp)
def test_get_today(self): def test_get_today(self):
expected = date.today().strftime("%B %d, %Y") expected = date.today().strftime("%B, %Y")
result = rendering.get_today() result = rendering.get_today()
self.assertEqual(expected, result, msg="Today's date is not correct.") self.assertEqual(expected, result, msg="Today's date is not correct.")