Skip to content

Commit

Permalink
Merge pull request #5 from akib1689/add-settings
Browse files Browse the repository at this point in the history
Update the documentation
  • Loading branch information
akib1689 authored Sep 7, 2024
2 parents 56cb87d + ab14bbf commit 9a1c74a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/reference/data/models/rendercv_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `rendercv.data.models.rendercv_settings`

::: rendercv.data.models.rendercv_settings
27 changes: 25 additions & 2 deletions docs/user_guide/structure_of_the_yaml_input_file.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Structure of the YAML Input File

RenderCV's input file consists of three parts: `cv`, `design`, and `locale_catalog`.
RenderCV's input file consists of four parts: `cv`, `design`, `locale_catalog` and `rendercv_settings`.

```yaml title="Your_Name_CV.yaml"
cv:
Expand All @@ -15,11 +15,16 @@ locale_catalog:
...
TRANSLATIONS TO YOUR LANGUAGE
...
rendercv_settings:
...
RENDERCV SETTINGS
...
```
- The `cv` field is mandatory. It contains the **content of the CV**.
- The `design` field is optional. It contains the **design options of the CV**. If you don't provide a `design` field, RenderCV will use the default design options with the `classic` theme.
- The `locale_catalog` field is optional. You can provide translations for some of the strings used in the CV, for example, month abbreviations. RenderCV will use English strings if you don't provide a `locale_catalog` field.
- The `rendercv_settings` field is optional. It contains the **settings of RenderCV**. If you don't provide a `rendercv_settings` field, RenderCV will use the default settings.

!!! tip
To maximize your productivity while editing the input YAML file, set up RenderCV's JSON Schema in your IDE. It will validate your inputs on the fly and give auto-complete suggestions.
Expand Down Expand Up @@ -355,4 +360,22 @@ locale_catalog:
```

1. The available phone number formats are: `national`, `international`, and `E164`.
2. The `MONTH_ABBREVIATION` and `YEAR` are placeholders. The available placeholders are: `FULL_MONTH_NAME`, `MONTH_ABBREVIATION`, `MONTH`, `MONTH_IN_TWO_DIGITS`, `YEAR`, and `YEAR_IN_TWO_DIGITS`.
2. The `MONTH_ABBREVIATION` and `YEAR` are placeholders. The available placeholders are: `FULL_MONTH_NAME`, `MONTH_ABBREVIATION`, `MONTH`, `MONTH_IN_TWO_DIGITS`, `YEAR`, and `YEAR_IN_TWO_DIGITS`.

## "`rendercv_settings`" field

The `rendercv_settings` field contains the settings of RenderCV. This feature is what makes RenderCV a flexible tool. You can change the output folder name, the paths of the output files, and disable the generation of some output files directly from within the code (You can also use the [cli arguments](cli.md) which ever is convinient for you). Below is an example of the `rendercv_settings` field:

```yaml
rendercv_settings:
output_folder_name: output # default value is 'rendercv_output'
pdf_path: cv.pdf # default value is 'None'
latex_path: cv.tex # default value is 'None'
html_path: cv.html # default value is 'None'
markdown_path: cv.md # default value is 'None'
dont_generate_html: false # default value is 'false'
dont_generate_markdown: false # default value is 'false'
dont_generate_png: false # default value is 'false'
```

All this fields are optional. If you don't provide a `rendercv_settings` field, RenderCV will use the default settings.
1 change: 1 addition & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ nav:
- curriculum_vitae.py: reference/data/models/curriculum_vitae.md
- design.py: reference/data/models/design.md
- locale_catalog.py: reference/data/models/locale_catalog.md
- rendercv_settings.py: reference/data/models/rendercv_settings.md
- rendercv_data_model.py: reference/data/models/rendercv_data_model.md
- generator.py: reference/data/generator.md
- reader.py: reference/data/reader.md
Expand Down
2 changes: 1 addition & 1 deletion rendercv/cli/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def parse_render_settings(
Args:
dictionary (dict): The dictionary to be combined with the command line
arguments.
command_line_arguments (dict[str, str]): The command line arguments.
cli_arguments (dict[str, str]): The command line arguments.
Returns:
dict[str, str]: The combined dictionary.
Expand Down

0 comments on commit 9a1c74a

Please sign in to comment.