Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sinaatalay committed Oct 20, 2023
1 parent 54ede24 commit 58fc488
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions rendercv/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ def new(name: Annotated[str, typer.Argument(help="Full name")]):
try:
environment = Environment(
loader=PackageLoader("rendercv", os.path.join("templates")),
trim_blocks=True,
lstrip_blocks=True,
)
environment.variable_start_string = "<<"
environment.variable_end_string = ">>"
Expand Down
16 changes: 8 additions & 8 deletions rendercv/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ class ClassicThemeSectionTitleMargins(BaseModel):
class ClassicThemeEntryAreaMargins(BaseModel):
"""This class stores the margins of entry areas for the classic theme.
For the classic theme, entry areas are [OneLineEntry](../index.md#onelineentry),
[NormalEntry](../index.md#normalentry), and
[ExperienceEntry](../index.md#experienceentry).
For the classic theme, entry areas are [OneLineEntry](../user_guide.md#onelineentry),
[NormalEntry](../user_guide.md#normalentry), and
[ExperienceEntry](../user_guide.md#experienceentry).
"""

left: LaTeXDimension = Field(
Expand Down Expand Up @@ -794,7 +794,7 @@ def month_and_year(self) -> Optional[str]:


class OneLineEntry(Event):
"""This class stores [OneLineEntry](../index.md#onelineentry) information."""
"""This class stores [OneLineEntry](../user_guide.md#onelineentry) information."""

name: str = Field(
title="Name",
Expand All @@ -807,7 +807,7 @@ class OneLineEntry(Event):


class NormalEntry(Event):
"""This class stores [NormalEntry](../index.md#normalentry) information."""
"""This class stores [NormalEntry](../user_guide.md#normalentry) information."""

name: str = Field(
title="Name",
Expand All @@ -816,7 +816,7 @@ class NormalEntry(Event):


class ExperienceEntry(Event):
"""This class stores [ExperienceEntry](../index.md#experienceentry) information."""
"""This class stores [ExperienceEntry](../user_guide.md#experienceentry) information."""

company: str = Field(
title="Company",
Expand All @@ -829,7 +829,7 @@ class ExperienceEntry(Event):


class EducationEntry(Event):
"""This class stores [EducationEntry](../index.md#educationentry) information."""
"""This class stores [EducationEntry](../user_guide.md#educationentry) information."""

institution: str = Field(
title="Institution",
Expand Down Expand Up @@ -878,7 +878,7 @@ def highlight_strings(self) -> list[SpellCheckedString]:


class PublicationEntry(Event):
"""This class stores [PublicationEntry](../index.md#publicationentry) information."""
"""This class stores [PublicationEntry](../user_guide.md#publicationentry) information."""

title: str = Field(
title="Title of the Publication",
Expand Down
2 changes: 1 addition & 1 deletion rendercv/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def render_template(data: RenderCVDataModel, output_path: Optional[str] = None)
file_name = data.cv.name.replace(" ", "_") + "_CV.tex"
output_file_path = os.path.join(output_folder, file_name)
os.makedirs(os.path.dirname(output_file_path), exist_ok=True)
with open(output_file_path, "w", encoding="utf-8") as file:
with open(output_file_path, "w") as file:
file.write(output_latex_file)

# Copy the fonts directory to the output directory:
Expand Down

0 comments on commit 58fc488

Please sign in to comment.