diff --git a/docs/developer_guide.md b/docs/developer_guide.md index 429c0be..98bbb76 100644 --- a/docs/developer_guide.md +++ b/docs/developer_guide.md @@ -88,4 +88,23 @@ In some of the tests: When the `testdata` folder needs to be updated, it can be manually regenerated by setting `update_testdata` to `True` in `conftest.py` and running the tests. -Whenever the `testdata` folder is generated, the files should be reviewed manually to ensure everything works as expected. \ No newline at end of file +Whenever the `testdata` folder is generated, the files should be reviewed manually to ensure everything works as expected. + + +## Frequently Asked Questions (FAQ) + +### How can I add a new social network to RenderCV? + +To add a new social network to RenderCV, go to the `rendercv/data_models.py` file and follow these steps: + +1. Append the social network name (for example, "Facebook") to the `SocialNetworkName` type. +2. If necessary, implement its username validation in the `SocialNetwork.check_username` method. +3. Implement its URL generation using the `SocialNetwork.url` method. If the URL can be generated by appending the username to a hostname, only update `url_dictionary`. +4. Finally, include the $\LaTeX$ icon of the social network to the `icon_dictionary` in the `CurriculumVitae.connections` method. RenderCV uses the [`fontawesome5`](https://ctan.org/pkg/fontawesome5?lang=en) package. The available icons can be seen [here](https://fosszone.csd.auth.gr/CTAN/fonts/fontawesome5/doc/fontawesome5.pdf). + +Then, the tests should be implemented for the new social network with the following steps: + +1. Go to `tests/test_data_models.py` and update `test_social_network_url` accordingly. +2. Go to `tests/conftest.py` and add the new social network to `rendercv_filled_curriculum_vitae_data_model`. +3. Set `update_testdata` to `True` in `conftest.py` and run the tests to update the `testdata` folder. +4. Review the updated `testdata` folder manually to ensure everything works as expected. Then, set `update_testdata` to `False` and push the changes. diff --git a/docs/user_guide/structure_of_the_yaml_input_file.md b/docs/user_guide/structure_of_the_yaml_input_file.md index 3619f06..c30fe3c 100644 --- a/docs/user_guide/structure_of_the_yaml_input_file.md +++ b/docs/user_guide/structure_of_the_yaml_input_file.md @@ -17,9 +17,9 @@ locale_catalog: ... ``` -- The `cv` section is mandatory. It contains the **content of the CV**. -- The `design` section is optional. It contains the **design options of the CV**. If you don't provide a `design` section, RenderCV will use the default design options with the `classic` theme. -- The `locale_catalog` section 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` section. +- 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. !!! 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. @@ -40,9 +40,9 @@ locale_catalog: ``` 3. Press `Ctrl + Space` to see the auto-complete suggestions. -## "`cv`" section of the YAML input +## "`cv`" field -The `cv` section of the YAML input starts with generic information, as shown below. +The `cv` field of the YAML input starts with generic information, as shown below. ```yaml cv: @@ -60,7 +60,7 @@ cv: ... ``` -1. The available social networks are: {{available_social_networks}}. You can add more social networks by following the same pattern. The social network icons are automatically added to the header of the CV. +1. The available social networks are: {{available_social_networks}}. None of the values above are required. You can omit any or all of them, and RenderCV will adapt to your input. These generic fields are used in the header of the CV. @@ -84,7 +84,9 @@ cv: ... ``` -The `sections` field is a dictionary where the keys are the section titles, and the values are lists. Each item of the list is an entry for that section. +### "`cv.sections`" field + +The `cv.sections` field is a dictionary where the keys are the section titles, and the values are lists. Each item of the list is an entry for that section. Here is an example: @@ -121,7 +123,7 @@ The available entry types are: [`EducationEntry`](#education-entry), [`Experienc Each entry type is a different object (a dictionary). Below, you can find all the entry types along with their optional/mandatory fields and how they appear in each built-in theme. {% for entry_name, entry in showcase_entries.items() %} -### {{ entry_name }} +#### {{ entry_name }} {% if entry_name == "Education Entry" %} @@ -166,8 +168,10 @@ Each entry type is a different object (a dictionary). Below, you can find all th - `doi`: The DOI of the publication. - `journal`: The journal of the publication. - `date`: The date as a custom string or in `YYYY-MM-DD`, `YYYY-MM`, or `YYYY` format. + {% elif entry_name == "Normal Entry" %} + **Mandatory Fields:** - `name`: The name of the entry. @@ -179,6 +183,7 @@ Each entry type is a different object (a dictionary). Below, you can find all th - `end_date`: The end date in `YYYY-MM-DD`, `YYYY-MM`, or `YYYY` format or "present". - `date`: The date as a custom string or in `YYYY-MM-DD`, `YYYY-MM`, or `YYYY` format. This will override `start_date` and `end_date`. - `highlights`: A list of bullet points. + {% elif entry_name == "OneLineEntry" %} **Mandatory Fields:** @@ -204,14 +209,14 @@ Each entry type is a different object (a dictionary). Below, you can find all th {{ entry["yaml"] }} ``` {% for figure in entry["figures"] %} -`{{ figure["theme"] }}` theme: -![figure["alt_text"]]({{ figure["path"] }}) +=== "`{{ figure["theme"] }}` theme" + ![figure["alt_text"]]({{ figure["path"] }}) {% endfor %} {% endfor %} -## "`design`" section of the YAML input +## "`design`" field -The `cv` part of the input contains your content, and the `design` part contains your design options. The `design` part starts with a theme name. Currently, the available themes are: {{available_themes}}. However, custom themes can also be used (see [here](index.md#creating-custom-themes-with-the-create-theme-command).) +The `cv` field of the input contains your content, and the `design` field contains your design options. The `design` field starts with a theme name. Currently, the available themes are: {{available_themes}}. However, custom themes can also be used (see [here](index.md#creating-custom-themes-with-the-create-theme-command).) ```yaml design: @@ -221,7 +226,7 @@ design: Each theme may have different options for design. `classic`, `sb2nov`, and `engineeringresumes` almost use identical options, but `moderncv` is slightly different. Please use an IDE that supports JSON schema to avoid missing any available options for the theme (see [above](#structure-of-the-yaml-input-file)). -An example `design` part for a `classic` theme is shown below: +An example `design` field for a `classic` theme is shown below: ```yaml design: @@ -263,9 +268,9 @@ design: vertical_between_name_and_connections: 0.3 cm ``` -## "`locale_catalog`" section of the YAML input +## "`locale_catalog`" field -This section is what makes RenderCV a multilingual tool. RenderCV uses some English strings to render PDFs. For example, it takes the dates in ISO format (`2020-01-01`) and converts them into human-friendly strings (`"Jan. 2020"`). However, you can override these strings for your own language or needs with the `locale_catalog` section. +This field is what makes RenderCV a multilingual tool. RenderCV uses some English strings to render PDFs. For example, it takes the dates in ISO format (`2020-01-01`) and converts them into human-friendly strings (`"Jan. 2020"`). However, you can override these strings for your own language or needs with the `locale_catalog` field. Here is an example: @@ -290,4 +295,4 @@ locale_catalog: years: years # translation of the word "years" present: present # translation of the word "present" to: to # translation of the word "to" -``` \ No newline at end of file +``` diff --git a/rendercv/cli.py b/rendercv/cli.py index 55887d0..d2e5146 100644 --- a/rendercv/cli.py +++ b/rendercv/cli.py @@ -6,6 +6,7 @@ output. """ import json +import urllib.request import pathlib from typing import Annotated, Callable, Optional import re @@ -37,11 +38,62 @@ app = typer.Typer( rich_markup_mode="rich", add_completion=False, invoke_without_command=True, # to make rendercv --version work + no_args_is_help=True, + context_settings={"help_option_names": ["-h", "--help"]}, ) +def get_latest_version_number_from_pypi() -> Optional[str]: + """Get the latest version number of RenderCV from PyPI. + + Example: + ```python + get_latest_version_number_from_pypi() + ``` + will return: + `#!python "1.1"` + + Returns: + Optional[str]: The latest version number of RenderCV from PyPI. Returns None if + the version number cannot be fetched. + """ + version = None + url = "https://pypi.org/pypi/rendercv/json" + try: + with urllib.request.urlopen(url) as response: + data = response.read() + encoding = response.info().get_content_charset("utf-8") + json_data = json.loads(data.decode(encoding)) + version = json_data["info"]["version"] + except Exception: + pass + + return version + + +def warn_if_new_version_is_available() -> bool: + """Check if a new version of RenderCV is available and print a warning message if + there is a new version. Also, return True if there is a new version, and False + otherwise. + + Returns: + bool: True if there is a new version, and False otherwise. + """ + latest_version = get_latest_version_number_from_pypi() + if latest_version is not None and __version__ != latest_version: + warning( + f"A new version of RenderCV is available! You are using v{__version__}," + f" and the latest version is v{latest_version}." + ) + return True + else: + return False + + def welcome(): """Print a welcome message to the terminal.""" + warn_if_new_version_is_available() + table = rich.table.Table( title=( "\nWelcome to [bold]Render[dodger_blue3]CV[/dodger_blue3][/bold]! Some" @@ -106,7 +158,7 @@ def information(text: str): Args: text (str): The text of the information message. """ - print(f"[bold green]{text}") + print(f"[yellow]{text}") def get_error_message_and_location_and_value_from_a_custom_error( @@ -326,7 +378,11 @@ def handle_exceptions(function: Callable) -> Callable: except pydantic.ValidationError as e: handle_validation_error(e) except ruamel.yaml.YAMLError as e: - error("There is a YAML error in the input file!", e) + error( + "There is a YAML error in the input file!\n\nTry to use quotation marks" + " to make sure the YAML parser understands the field is a string.", + e, + ) except FileNotFoundError as e: error(e) except UnicodeDecodeError as e: @@ -428,7 +484,7 @@ class LiveProgressReporter(rich.live.Live): """End the live progress reporting.""" self.overall_progress.update( self.overall_task_id, - description=f"[bold green]{self.end_message}", + description=f"[yellow]{self.end_message}", ) @@ -521,8 +577,8 @@ def parse_data_model_override_arguments( @app.command( name="render", help=( - "Render a YAML input file. Example: [bold green]rendercv render" - " John_Doe_CV.yaml[/bold green]" + "Render a YAML input file. Example: [yellow]rendercv render" + " John_Doe_CV.yaml[/yellow]. Details: [cyan]rendercv render --help[/cyan]" ), # allow extra arguments for updating the data model: context_settings={"allow_extra_args": True, "ignore_unknown_options": True}, @@ -530,12 +586,13 @@ def parse_data_model_override_arguments( @handle_exceptions def cli_command_render( input_file_name: Annotated[ - str, - typer.Argument(help="Name of the YAML input file."), + str, typer.Argument(help="Name of the YAML input file.") ], use_local_latex_command: Annotated[ Optional[str], typer.Option( + "--use-local-latex-command", + "-use", help=( "Use the local LaTeX installation with the given command instead of the" " RenderCV's TinyTeX." @@ -545,36 +602,48 @@ def cli_command_render( output_folder_name: Annotated[ str, typer.Option( + "--output-folder-name", + "-o", help="Name of the output folder.", ), ] = "rendercv_output", latex_path: Annotated[ Optional[str], typer.Option( + "--latex-path", + "-latex", help="Copy the LaTeX file to the given path.", ), ] = None, pdf_path: Annotated[ Optional[str], typer.Option( + "--pdf-path", + "-pdf", help="Copy the PDF file to the given path.", ), ] = None, markdown_path: Annotated[ Optional[str], typer.Option( + "--markdown-path", + "-md", help="Copy the Markdown file to the given path.", ), ] = None, html_path: Annotated[ Optional[str], typer.Option( + "--html-path", + "-html", help="Copy the HTML file to the given path.", ), ] = None, png_path: Annotated[ Optional[str], typer.Option( + "--png-path", + "-png", help="Copy the PNG file to the given path.", ), ] = None, @@ -582,6 +651,7 @@ def cli_command_render( bool, typer.Option( "--dont-generate-markdown", + "-nomd", help="Don't generate the Markdown and HTML file.", ), ] = False, @@ -589,6 +659,7 @@ def cli_command_render( bool, typer.Option( "--dont-generate-html", + "-nohtml", help="Don't generate the HTML file.", ), ] = False, @@ -596,6 +667,7 @@ def cli_command_render( bool, typer.Option( "--dont-generate-png", + "-nopng", help="Don't generate the PNG file.", ), ] = False, @@ -711,8 +783,8 @@ def cli_command_render( @app.command( name="new", help=( - "Generate a YAML input file to get started. Example: [bold green]rendercv new" - ' "John Doe"[/bold green]' + "Generate a YAML input file to get started. Example: [yellow]rendercv new" + ' "John Doe"[/yellow]. Details: [cyan]rendercv new --help[/cyan]' ), ) def cli_command_new( @@ -783,8 +855,9 @@ def cli_command_new( @app.command( name="create-theme", help=( - "Create a custom theme folder based on an existing theme. Example: [bold" - " green]rendercv create-theme --based-on classic customtheme[/bold green]" + "Create a custom theme folder based on an existing theme. Example:" + " [yellow]rendercv create-theme customtheme[/yellow]. Details: [cyan]rendercv" + " create-theme --help[/cyan]" ), ) def cli_command_create_theme( @@ -844,8 +917,10 @@ def cli_command_create_theme( @app.callback() def main( version_requested: Annotated[ - Optional[bool], typer.Option("--version", help="Show the version.") + Optional[bool], typer.Option("--version", "-v", help="Show the version.") ] = None, ): if version_requested: - information(f"RenderCV v{__version__}") + there_is_a_new_version = warn_if_new_version_is_available() + if not there_is_a_new_version: + print(f"RenderCV v{__version__}") diff --git a/rendercv/data_models.py b/rendercv/data_models.py index 64a75c3..f19a453 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -641,15 +641,15 @@ Entry = ( | BulletEntry | str ) -ListOfEntries = ( - list[OneLineEntry] - | list[NormalEntry] - | list[ExperienceEntry] - | list[EducationEntry] - | list[PublicationEntry] - | list[BulletEntry] - | list[str] -) +ListOfEntries = list[ + OneLineEntry + | NormalEntry + | ExperienceEntry + | EducationEntry + | PublicationEntry + | BulletEntry + | str +] entry_types = Entry.__args__[:-1] # a tuple of all the entry types except str entry_type_names = [entry_type.__name__ for entry_type in entry_types] + ["TextEntry"] @@ -838,6 +838,7 @@ SocialNetworkName = Literal[ "StackOverflow", "ResearchGate", "YouTube", + "Google Scholar", ] available_social_networks = get_args(SocialNetworkName) @@ -909,6 +910,7 @@ class SocialNetwork(RenderCVBaseModel): "ResearchGate": "https://researchgate.net/profile/", "YouTube": "https://youtube.com/", "Google Scholar": "https://scholar.google.com/citations?user=", + "Google Scholar": "https://scholar.google.com/citations?user=", } url = url_dictionary[self.network] + self.username @@ -1019,6 +1021,7 @@ class CurriculumVitae(RenderCVBaseModel): "Twitter": "\\faTwitter", "ResearchGate": "\\faResearchgate", "YouTube": "\\faYoutube", + "Google Scholar": "\\faGraduationCap", } for social_network in self.social_networks: clean_url = social_network.url.replace("https://", "").rstrip("/") @@ -1032,6 +1035,9 @@ class CurriculumVitae(RenderCVBaseModel): if social_network.network == "StackOverflow": username = social_network.username.split("/")[1] connection["placeholder"] = username + if social_network.network == "Google Scholar": + connection["placeholder"] = "Google Scholar" + connections.append(connection) return connections @@ -1761,27 +1767,16 @@ def generate_json_schema() -> dict[str, Any]: # already have the required field. Moreover, we would like to warn # users if they provide null values. They can remove the fields if they # don't want to provide them. - null_type_dict = {} - null_type_dict["type"] = "null" + null_type_dict = { + "type": "null", + } for field_name, field in value["properties"].items(): if "anyOf" in field: - if ( - len(field["anyOf"]) == 2 - and null_type_dict in field["anyOf"] - ): - field["oneOf"] = [field["anyOf"][0]] - del field["anyOf"] + if null_type_dict in field["anyOf"]: + field["anyOf"].remove(null_type_dict) - # For sections field of CurriculumVitae: - if "additionalProperties" in field["oneOf"][0]: - field["oneOf"][0]["additionalProperties"]["oneOf"] = ( - field["oneOf"][0]["additionalProperties"]["anyOf"] - ) - del field["oneOf"][0]["additionalProperties"]["anyOf"] - - else: - field["oneOf"] = field["anyOf"] - del field["anyOf"] + field["oneOf"] = field["anyOf"] + del field["anyOf"] return json_schema diff --git a/schema.json b/schema.json index eab021b..af6e23d 100644 --- a/schema.json +++ b/schema.json @@ -20,14 +20,37 @@ "additionalProperties": false, "description": "This class is the data model of the theme options for the `classic` theme.", "properties": { - "theme": { - "const": "classic", - "enum": [ - "classic" + "color": { + "default": "rgb(0,79,144)", + "description": "The primary color of the theme. \nThe color can be specified either with their name (https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,79,144).", + "examples": [ + "Black", + "7fffd4", + "rgb(0,79,144)", + "hsl(270, 60%, 70%)" ], - "title": "Theme", + "format": "color", + "title": "Primary Color", "type": "string" }, + "disable_external_link_icons": { + "default": false, + "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is false.", + "title": "Disable External Link Icons", + "type": "boolean" + }, + "disable_last_updated_date": { + "default": false, + "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is false.", + "title": "Disable Last Updated Date", + "type": "boolean" + }, + "disable_page_numbering": { + "default": false, + "description": "If this option is set to true, then the page numbering will not be shown. The default value is false.", + "title": "Disable Page Numbering", + "type": "boolean" + }, "font": { "default": "Source Sans 3", "description": "The font family of the CV. The default value is Source Sans 3.", @@ -52,6 +75,62 @@ "title": "Font Size", "type": "string" }, + "header_font_size": { + "default": "30 pt", + "description": "The font size of the header (the name of the person). The default value is 30 pt.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Header Font Size", + "type": "string" + }, + "last_updated_date_style": { + "default": "Last updated in TODAY", + "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", + "title": "Last Updated Date Style", + "type": "string" + }, + "margins": { + "allOf": [ + { + "$ref": "#/$defs/MarginsForClassic" + } + ], + "default": { + "entry_area": { + "date_and_location_width": "4.5 cm", + "education_degree_width": "1 cm", + "left_and_right": "0.2 cm", + "vertical_between": "0.2 cm" + }, + "header": { + "bottom": "0.3 cm", + "horizontal_between_connections": "0.5 cm", + "vertical_between_name_and_connections": "0.3 cm" + }, + "highlights_area": { + "left": "0.4 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "page": { + "bottom": "2 cm", + "left": "2 cm", + "right": "2 cm", + "top": "2 cm" + }, + "section_title": { + "bottom": "0.2 cm", + "top": "0.3 cm" + } + }, + "description": "Page, section title, entry field, and highlights field margins.", + "title": "Margins" + }, + "page_numbering_style": { + "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", + "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", + "title": "Page Numbering Style", + "type": "string" + }, "page_size": { "default": "letterpaper", "description": "The page size of the CV. It can be a4paper or letterpaper. The default value is letterpaper.", @@ -62,55 +141,14 @@ "title": "Page Size", "type": "string" }, - "color": { - "default": "rgb(0,79,144)", - "description": "The primary color of the theme. \nThe color can be specified either with their name (https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,79,144).", - "examples": [ - "Black", - "7fffd4", - "rgb(0,79,144)", - "hsl(270, 60%, 70%)" - ], - "format": "color", - "title": "Primary Color", - "type": "string" - }, - "disable_external_link_icons": { - "default": false, - "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is false.", - "title": "Disable External Link Icons", - "type": "boolean" - }, - "disable_page_numbering": { - "default": false, - "description": "If this option is set to true, then the page numbering will not be shown. The default value is false.", - "title": "Disable Page Numbering", - "type": "boolean" - }, - "page_numbering_style": { - "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", - "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", - "title": "Page Numbering Style", - "type": "string" - }, - "disable_last_updated_date": { - "default": false, - "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is false.", - "title": "Disable Last Updated Date", - "type": "boolean" - }, - "last_updated_date_style": { - "default": "Last updated in TODAY", - "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", - "title": "Last Updated Date Style", - "type": "string" - }, - "header_font_size": { - "default": "30 pt", - "description": "The font size of the header (the name of the person). The default value is 30 pt.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Header Font Size", - "type": "string" + "show_timespan_in": { + "default": [], + "description": "The time span will be shown in the date and location column in these sections. The input should be a list of section titles as strings (case-sensitive). The default value is an empty list, which means the time span will not be shown in any section.", + "items": { + "type": "string" + }, + "title": "Show Time Span in These Sections", + "type": "array" }, "text_alignment": { "default": "justified", @@ -123,51 +161,13 @@ "title": "Text Alignment", "type": "string" }, - "margins": { - "allOf": [ - { - "$ref": "#/$defs/MarginsForClassic" - } + "theme": { + "const": "classic", + "enum": [ + "classic" ], - "default": { - "page": { - "bottom": "2 cm", - "left": "2 cm", - "right": "2 cm", - "top": "2 cm" - }, - "section_title": { - "bottom": "0.2 cm", - "top": "0.3 cm" - }, - "entry_area": { - "date_and_location_width": "4.5 cm", - "education_degree_width": "1 cm", - "left_and_right": "0.2 cm", - "vertical_between": "0.2 cm" - }, - "highlights_area": { - "left": "0.4 cm", - "top": "0.10 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "header": { - "bottom": "0.3 cm", - "horizontal_between_connections": "0.5 cm", - "vertical_between_name_and_connections": "0.3 cm" - } - }, - "description": "Page, section title, entry field, and highlights field margins.", - "title": "Margins" - }, - "show_timespan_in": { - "default": [], - "description": "The time span will be shown in the date and location column in these sections. The input should be a list of section titles as strings (case-sensitive). The default value is an empty list, which means the time span will not be shown in any section.", - "items": { - "type": "string" - }, - "title": "Show Time Span in These Sections", - "type": "array" + "title": "Theme", + "type": "string" } }, "required": [ @@ -180,51 +180,50 @@ "additionalProperties": false, "description": "This class is the data model of the CV.", "properties": { - "name": { - "default": null, - "description": "The name of the person.", - "title": "Name", - "oneOf": [ - { - "type": "string" - } - ] - }, - "label": { - "default": null, - "description": "The label of the person.", - "title": "Label", - "oneOf": [ - { - "type": "string" - } - ] - }, - "location": { - "default": null, - "description": "The location of the person.", - "title": "Location", - "oneOf": [ - { - "type": "string" - } - ] - }, "email": { "default": null, "description": "The email of the person.", - "title": "Email", "oneOf": [ { "format": "email", "type": "string" } - ] + ], + "title": "Email" + }, + "label": { + "default": null, + "description": "The label of the person.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Label" + }, + "location": { + "default": null, + "description": "The location of the person.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Location" + }, + "name": { + "default": null, + "description": "The name of the person.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Name" }, "phone": { "default": null, "description": "The phone number of the person.", - "title": "Phone", "oneOf": [ { "format": "phone", @@ -232,25 +231,50 @@ "minLength": 7, "type": "string" } - ] + ], + "title": "Phone" }, - "website": { + "sections": { "default": null, - "description": "The website of the person.", - "title": "Website", + "description": "The sections of the CV.", "oneOf": [ { - "format": "uri", - "maxLength": 2083, - "minLength": 1, - "type": "string" + "additionalProperties": { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/OneLineEntry" + }, + { + "$ref": "#/$defs/NormalEntry" + }, + { + "$ref": "#/$defs/ExperienceEntry" + }, + { + "$ref": "#/$defs/EducationEntry" + }, + { + "$ref": "#/$defs/PublicationEntry" + }, + { + "$ref": "#/$defs/BulletEntry" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "type": "object" } - ] + ], + "title": "Sections" }, "social_networks": { "default": null, "description": "The social networks of the person.", - "title": "Social Networks", "oneOf": [ { "items": { @@ -258,63 +282,21 @@ }, "type": "array" } - ] + ], + "title": "Social Networks" }, - "sections": { + "website": { "default": null, - "description": "The sections of the CV.", - "title": "Sections", + "description": "The website of the person.", "oneOf": [ { - "additionalProperties": { - "oneOf": [ - { - "items": { - "$ref": "#/$defs/OneLineEntry" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/$defs/NormalEntry" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/$defs/ExperienceEntry" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/$defs/EducationEntry" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/$defs/PublicationEntry" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/$defs/BulletEntry" - }, - "type": "array" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ] - }, - "type": "object" + "format": "uri", + "maxLength": 2083, + "minLength": 1, + "type": "string" } - ] + ], + "title": "Website" } }, "title": "CurriculumVitae", @@ -324,16 +306,28 @@ "additionalProperties": false, "description": "This class is the data model of `EducationEntry`.", "properties": { - "institution": { - "description": "The institution name.", - "title": "Institution", - "type": "string" - }, "area": { "description": "The area of study.", "title": "Area", "type": "string" }, + "date": { + "default": null, + "description": "The date field can be filled in YYYY-MM-DD, YYYY-MM, or YYYY formats or as an arbitrary string like \"Fall 2023\".", + "examples": [ + "2020-09-24", + "Fall 2023" + ], + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "title": "Date" + }, "degree": { "default": null, "description": "The type of the degree.", @@ -343,65 +337,12 @@ "PhD", "MS" ], - "title": "Degree", "oneOf": [ { "type": "string" } - ] - }, - "date": { - "default": null, - "description": "The date field can be filled in YYYY-MM-DD, YYYY-MM, or YYYY formats or as an arbitrary string like \"Fall 2023\".", - "examples": [ - "2020-09-24", - "Fall 2023" ], - "title": "Date", - "oneOf": [ - { - "type": "integer" - }, - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "location": { - "default": null, - "description": "The location of the event.", - "examples": [ - "Istanbul, Türkiye" - ], - "title": "Location", - "oneOf": [ - { - "type": "string" - } - ] - }, - "start_date": { - "default": null, - "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", - "examples": [ - "2020-09-24" - ], - "title": "Start Date", - "oneOf": [ - { - "type": "integer" - }, - { - "pattern": "\\d{4}-\\d{2}(-\\d{2})?", - "type": "string" - }, - { - "type": "null" - } - ] + "title": "Degree" }, "end_date": { "default": null, @@ -410,7 +351,6 @@ "2020-09-24", "present" ], - "title": "End Date", "oneOf": [ { "const": "present", @@ -425,11 +365,9 @@ { "pattern": "\\d{4}-\\d{2}(-\\d{2})?", "type": "string" - }, - { - "type": "null" } - ] + ], + "title": "End Date" }, "highlights": { "default": null, @@ -438,7 +376,6 @@ "Did this.", "Did that." ], - "title": "Highlights", "oneOf": [ { "items": { @@ -446,7 +383,43 @@ }, "type": "array" } - ] + ], + "title": "Highlights" + }, + "institution": { + "description": "The institution name.", + "title": "Institution", + "type": "string" + }, + "location": { + "default": null, + "description": "The location of the event.", + "examples": [ + "Istanbul, Türkiye" + ], + "oneOf": [ + { + "type": "string" + } + ], + "title": "Location" + }, + "start_date": { + "default": null, + "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", + "examples": [ + "2020-09-24" + ], + "oneOf": [ + { + "type": "integer" + }, + { + "pattern": "\\d{4}-\\d{2}(-\\d{2})?", + "type": "string" + } + ], + "title": "Start Date" } }, "required": [ @@ -460,14 +433,37 @@ "additionalProperties": false, "description": "This class is the data model of the theme options for the `engineeringresumes`\ntheme.", "properties": { - "theme": { - "const": "engineeringresumes", - "enum": [ - "engineeringresumes" + "color": { + "default": "rgb(0,0,0)", + "description": "The primary color of the theme. \nThe color can be specified either with their [name](https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,0,0).", + "examples": [ + "Black", + "7fffd4", + "rgb(0,79,144)", + "hsl(270, 60%, 70%)" ], - "title": "Theme", + "format": "color", + "title": "Primary Color", "type": "string" }, + "disable_external_link_icons": { + "default": true, + "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is true.", + "title": "Disable External Link Icons", + "type": "boolean" + }, + "disable_last_updated_date": { + "default": true, + "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is true.", + "title": "Disable Last Updated Date", + "type": "boolean" + }, + "disable_page_numbering": { + "default": true, + "description": "If this option is set to true, then the page numbering will not be shown. The default value is true.", + "title": "Disable Page Numbering", + "type": "boolean" + }, "font": { "default": "Charter", "description": "The font family of the CV. The default value is Charter.", @@ -492,6 +488,61 @@ "title": "Font Size", "type": "string" }, + "header_font_size": { + "default": "25 pt", + "description": "The font size of the header (the name of the person). The default value is 25 pt.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Header Font Size", + "type": "string" + }, + "last_updated_date_style": { + "default": "Last updated in TODAY", + "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", + "title": "Last Updated Date Style", + "type": "string" + }, + "margins": { + "allOf": [ + { + "$ref": "#/$defs/MarginsForEngineeringresumes" + } + ], + "default": { + "entry_area": { + "date_and_location_width": "4.5 cm", + "left_and_right": "0 cm", + "vertical_between": "0.2 cm" + }, + "header": { + "bottom": "5 pt", + "horizontal_between_connections": "10 pt", + "vertical_between_name_and_connections": "5 pt" + }, + "highlights_area": { + "left": "0 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "page": { + "bottom": "2 cm", + "left": "2 cm", + "right": "2 cm", + "top": "2 cm" + }, + "section_title": { + "bottom": "0.2 cm", + "top": "0.3 cm" + } + }, + "description": "Page, section title, entry field, and highlights field margins.", + "title": "Margins" + }, + "page_numbering_style": { + "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", + "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", + "title": "Page Numbering Style", + "type": "string" + }, "page_size": { "default": "letterpaper", "description": "The page size of the CV. It can be a4paper or letterpaper. The default value is letterpaper.", @@ -502,56 +553,6 @@ "title": "Page Size", "type": "string" }, - "color": { - "default": "rgb(0,0,0)", - "description": "The primary color of the theme. \nThe color can be specified either with their [name](https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,0,0).", - "examples": [ - "Black", - "7fffd4", - "rgb(0,79,144)", - "hsl(270, 60%, 70%)" - ], - "format": "color", - "title": "Primary Color", - "type": "string" - }, - "disable_external_link_icons": { - "default": true, - "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is true.", - "title": "Disable External Link Icons", - "type": "boolean" - }, - "disable_page_numbering": { - "default": true, - "description": "If this option is set to true, then the page numbering will not be shown. The default value is true.", - "title": "Disable Page Numbering", - "type": "boolean" - }, - "page_numbering_style": { - "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", - "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", - "title": "Page Numbering Style", - "type": "string" - }, - "disable_last_updated_date": { - "default": true, - "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is true.", - "title": "Disable Last Updated Date", - "type": "boolean" - }, - "last_updated_date_style": { - "default": "Last updated in TODAY", - "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", - "title": "Last Updated Date Style", - "type": "string" - }, - "header_font_size": { - "default": "25 pt", - "description": "The font size of the header (the name of the person). The default value is 25 pt.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Header Font Size", - "type": "string" - }, "text_alignment": { "default": "left-aligned", "description": "The alignment of the text. The default value is left-aligned.", @@ -563,41 +564,13 @@ "title": "Text Alignment", "type": "string" }, - "margins": { - "allOf": [ - { - "$ref": "#/$defs/MarginsForEngineeringresumes" - } + "theme": { + "const": "engineeringresumes", + "enum": [ + "engineeringresumes" ], - "default": { - "page": { - "bottom": "2 cm", - "left": "2 cm", - "right": "2 cm", - "top": "2 cm" - }, - "section_title": { - "bottom": "0.2 cm", - "top": "0.3 cm" - }, - "entry_area": { - "date_and_location_width": "4.5 cm", - "left_and_right": "0 cm", - "vertical_between": "0.2 cm" - }, - "highlights_area": { - "left": "0 cm", - "top": "0.10 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "header": { - "bottom": "5 pt", - "horizontal_between_connections": "10 pt", - "vertical_between_name_and_connections": "5 pt" - } - }, - "description": "Page, section title, entry field, and highlights field margins.", - "title": "Margins" + "title": "Theme", + "type": "string" } }, "required": [ @@ -607,37 +580,16 @@ "type": "object" }, "EntryAreaMargins": { + "additionalProperties": false, "description": "This class is a data model for the entry area margins.", "properties": { - "left_and_right": { - "default": "0.2 cm", - "description": "The left margin of entry areas. The default value is 0.2 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Left Margin", - "type": "string" - }, - "vertical_between": { - "default": "0.2 cm", - "description": "The vertical margin between entry areas. The default value is 0.2 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Vertical Margin Between Entry Areas", - "type": "string" - }, "date_and_location_width": { "default": "4.5 cm", "description": "The width of the date and location column. The default value is 4.5 cm.", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Date and Location Column Width", "type": "string" - } - }, - "title": "EntryAreaMargins", - "type": "object", - "additionalProperties": false - }, - "EntryAreaMarginsForClassic": { - "description": "This class is a data model for the entry area margins.", - "properties": { + }, "left_and_right": { "default": "0.2 cm", "description": "The left margin of entry areas. The default value is 0.2 cm.", @@ -651,7 +603,15 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Vertical Margin Between Entry Areas", "type": "string" - }, + } + }, + "title": "EntryAreaMargins", + "type": "object" + }, + "EntryAreaMarginsForClassic": { + "additionalProperties": false, + "description": "This class is a data model for the entry area margins.", + "properties": { "date_and_location_width": { "default": "4.5 cm", "description": "The width of the date and location column. The default value is 4.5 cm.", @@ -665,15 +625,36 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Date and Location Column Width", "type": "string" + }, + "left_and_right": { + "default": "0.2 cm", + "description": "The left margin of entry areas. The default value is 0.2 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Left Margin", + "type": "string" + }, + "vertical_between": { + "default": "0.2 cm", + "description": "The vertical margin between entry areas. The default value is 0.2 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Vertical Margin Between Entry Areas", + "type": "string" } }, "title": "EntryAreaMarginsForClassic", - "type": "object", - "additionalProperties": false + "type": "object" }, "EntryAreaMarginsForEngineeringresumes": { + "additionalProperties": false, "description": "This class is a data model for the entry area margins.", "properties": { + "date_and_location_width": { + "default": "4.5 cm", + "description": "The width of the date and location column. The default value is 4.5 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Date and Location Column Width", + "type": "string" + }, "left_and_right": { "default": "0 cm", "description": "The left margin of entry areas. The default value is 0 cm.", @@ -687,18 +668,10 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Vertical Margin Between Entry Areas", "type": "string" - }, - "date_and_location_width": { - "default": "4.5 cm", - "description": "The width of the date and location column. The default value is 4.5 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Date and Location Column Width", - "type": "string" } }, "title": "EntryAreaMarginsForEngineeringresumes", - "type": "object", - "additionalProperties": false + "type": "object" }, "ExperienceEntry": { "additionalProperties": false, @@ -709,11 +682,6 @@ "title": "Company", "type": "string" }, - "position": { - "description": "The position.", - "title": "Position", - "type": "string" - }, "date": { "default": null, "description": "The date field can be filled in YYYY-MM-DD, YYYY-MM, or YYYY formats or as an arbitrary string like \"Fall 2023\".", @@ -721,51 +689,15 @@ "2020-09-24", "Fall 2023" ], - "title": "Date", "oneOf": [ { "type": "integer" }, { "type": "string" - }, - { - "type": "null" } - ] - }, - "location": { - "default": null, - "description": "The location of the event.", - "examples": [ - "Istanbul, Türkiye" ], - "title": "Location", - "oneOf": [ - { - "type": "string" - } - ] - }, - "start_date": { - "default": null, - "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", - "examples": [ - "2020-09-24" - ], - "title": "Start Date", - "oneOf": [ - { - "type": "integer" - }, - { - "pattern": "\\d{4}-\\d{2}(-\\d{2})?", - "type": "string" - }, - { - "type": "null" - } - ] + "title": "Date" }, "end_date": { "default": null, @@ -774,7 +706,6 @@ "2020-09-24", "present" ], - "title": "End Date", "oneOf": [ { "const": "present", @@ -789,11 +720,9 @@ { "pattern": "\\d{4}-\\d{2}(-\\d{2})?", "type": "string" - }, - { - "type": "null" } - ] + ], + "title": "End Date" }, "highlights": { "default": null, @@ -802,7 +731,6 @@ "Did this.", "Did that." ], - "title": "Highlights", "oneOf": [ { "items": { @@ -810,7 +738,43 @@ }, "type": "array" } - ] + ], + "title": "Highlights" + }, + "location": { + "default": null, + "description": "The location of the event.", + "examples": [ + "Istanbul, Türkiye" + ], + "oneOf": [ + { + "type": "string" + } + ], + "title": "Location" + }, + "position": { + "description": "The position.", + "title": "Position", + "type": "string" + }, + "start_date": { + "default": null, + "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", + "examples": [ + "2020-09-24" + ], + "oneOf": [ + { + "type": "integer" + }, + { + "pattern": "\\d{4}-\\d{2}(-\\d{2})?", + "type": "string" + } + ], + "title": "Start Date" } }, "required": [ @@ -821,15 +785,9 @@ "type": "object" }, "HeaderMargins": { + "additionalProperties": false, "description": "This class is a data model for the header margins.", "properties": { - "vertical_between_name_and_connections": { - "default": "0.3 cm", - "description": "The vertical margin between the name of the person and the connections. The default value is 0.3 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Vertical Margin Between the Name and Connections", - "type": "string" - }, "bottom": { "default": "0.3 cm", "description": "The bottom margin of the header, i.e., the vertical margin between the connections and the first section title. The default value is 0.3 cm.", @@ -843,22 +801,22 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Space Between Connections", "type": "string" - } - }, - "title": "HeaderMargins", - "type": "object", - "additionalProperties": false - }, - "HeaderMarginsForEngineeringresumes": { - "description": "This class is a data model for the header margins.", - "properties": { + }, "vertical_between_name_and_connections": { - "default": "5 pt", - "description": "The vertical margin between the name of the person and the connections. The default value is 5 pt.", + "default": "0.3 cm", + "description": "The vertical margin between the name of the person and the connections. The default value is 0.3 cm.", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Vertical Margin Between the Name and Connections", "type": "string" - }, + } + }, + "title": "HeaderMargins", + "type": "object" + }, + "HeaderMarginsForEngineeringresumes": { + "additionalProperties": false, + "description": "This class is a data model for the header margins.", + "properties": { "bottom": { "default": "5 pt", "description": "The bottom margin of the header, i.e., the vertical margin between the connections and the first section title. The default value is 5 pt.", @@ -872,22 +830,22 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Space Between Connections", "type": "string" + }, + "vertical_between_name_and_connections": { + "default": "5 pt", + "description": "The vertical margin between the name of the person and the connections. The default value is 5 pt.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Vertical Margin Between the Name and Connections", + "type": "string" } }, "title": "HeaderMarginsForEngineeringresumes", - "type": "object", - "additionalProperties": false + "type": "object" }, "HighlightsAreaMargins": { + "additionalProperties": false, "description": "This class is a data model for the highlights area margins.", "properties": { - "top": { - "default": "0.10 cm", - "description": "The top margin of highlights areas. The default value is 0.10 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Top Margin", - "type": "string" - }, "left": { "default": "0.4 cm", "description": "The left margin of highlights areas. The default value is 0.4 cm.", @@ -895,6 +853,13 @@ "title": "Left Margin", "type": "string" }, + "top": { + "default": "0.10 cm", + "description": "The top margin of highlights areas. The default value is 0.10 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Top Margin", + "type": "string" + }, "vertical_between_bullet_points": { "default": "0.10 cm", "description": "The vertical margin between bullet points. The default value is 0.10 cm.", @@ -904,19 +869,12 @@ } }, "title": "HighlightsAreaMargins", - "type": "object", - "additionalProperties": false + "type": "object" }, "HighlightsAreaMarginsForEngineeringresumes": { + "additionalProperties": false, "description": "This class is a data model for the highlights area margins.", "properties": { - "top": { - "default": "0.10 cm", - "description": "The top margin of highlights areas. The default value is 0.10 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Top Margin", - "type": "string" - }, "left": { "default": "0 cm", "description": "The left margin of highlights areas. The default value is 0 cm.", @@ -924,6 +882,13 @@ "title": "Left Margin", "type": "string" }, + "top": { + "default": "0.10 cm", + "description": "The top margin of highlights areas. The default value is 0.10 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Top Margin", + "type": "string" + }, "vertical_between_bullet_points": { "default": "0.10 cm", "description": "The vertical margin between bullet points. The default value is 0.10 cm.", @@ -933,73 +898,12 @@ } }, "title": "HighlightsAreaMarginsForEngineeringresumes", - "type": "object", - "additionalProperties": false + "type": "object" }, "LocaleCatalog": { "additionalProperties": false, "description": "This class is the data model of the locale catalog. The values of each field\nupdates the `locale_catalog` dictionary.", "properties": { - "month": { - "default": "month", - "description": "Translation of the word \"month\" in the locale.", - "title": "Translation of \"Month\"", - "oneOf": [ - { - "type": "string" - } - ] - }, - "months": { - "default": "months", - "description": "Translation of the word \"months\" in the locale.", - "title": "Translation of \"Months\"", - "oneOf": [ - { - "type": "string" - } - ] - }, - "year": { - "default": "year", - "description": "Translation of the word \"year\" in the locale.", - "title": "Translation of \"Year\"", - "oneOf": [ - { - "type": "string" - } - ] - }, - "years": { - "default": "years", - "description": "Translation of the word \"years\" in the locale.", - "title": "Translation of \"Years\"", - "oneOf": [ - { - "type": "string" - } - ] - }, - "present": { - "default": "present", - "description": "Translation of the word \"present\" in the locale.", - "title": "Translation of \"Present\"", - "oneOf": [ - { - "type": "string" - } - ] - }, - "to": { - "default": "to", - "description": "Translation of the word \"to\" in the locale.", - "title": "Translation of \"To\"", - "oneOf": [ - { - "type": "string" - } - ] - }, "abbreviations_for_months": { "default": [ "Jan.", @@ -1016,7 +920,6 @@ "Dec." ], "description": "Abbreviations of the months in the locale.", - "title": "Abbreviations of Months", "oneOf": [ { "items": { @@ -1026,43 +929,77 @@ "minItems": 12, "type": "array" } - ] + ], + "title": "Abbreviations of Months" + }, + "month": { + "default": "month", + "description": "Translation of the word \"month\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"Month\"" + }, + "months": { + "default": "months", + "description": "Translation of the word \"months\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"Months\"" + }, + "present": { + "default": "present", + "description": "Translation of the word \"present\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"Present\"" + }, + "to": { + "default": "to", + "description": "Translation of the word \"to\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"To\"" + }, + "year": { + "default": "year", + "description": "Translation of the word \"year\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"Year\"" + }, + "years": { + "default": "years", + "description": "Translation of the word \"years\" in the locale.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Translation of \"Years\"" } }, "title": "LocaleCatalog", "type": "object" }, "Margins": { + "additionalProperties": false, "description": "This class is a data model for the margins.", "properties": { - "page": { - "allOf": [ - { - "$ref": "#/$defs/PageMargins" - } - ], - "default": { - "top": "2 cm", - "bottom": "2 cm", - "left": "2 cm", - "right": "2 cm" - }, - "description": "Page margins.", - "title": "Page Margins" - }, - "section_title": { - "allOf": [ - { - "$ref": "#/$defs/SectionTitleMargins" - } - ], - "default": { - "top": "0.3 cm", - "bottom": "0.2 cm" - }, - "description": "Section title margins.", - "title": "Section Title Margins" - }, "entry_area": { "allOf": [ { @@ -1070,27 +1007,13 @@ } ], "default": { + "date_and_location_width": "4.5 cm", "left_and_right": "0.2 cm", - "vertical_between": "0.2 cm", - "date_and_location_width": "4.5 cm" + "vertical_between": "0.2 cm" }, "description": "Entry area margins.", "title": "Entry Area Margins" }, - "highlights_area": { - "allOf": [ - { - "$ref": "#/$defs/HighlightsAreaMargins" - } - ], - "default": { - "top": "0.10 cm", - "left": "0.4 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "description": "Highlights area margins.", - "title": "Highlights Area Margins" - }, "header": { "allOf": [ { @@ -1098,21 +1021,27 @@ } ], "default": { - "vertical_between_name_and_connections": "0.3 cm", "bottom": "0.3 cm", - "horizontal_between_connections": "0.5 cm" + "horizontal_between_connections": "0.5 cm", + "vertical_between_name_and_connections": "0.3 cm" }, "description": "Header margins.", "title": "Header Margins" - } - }, - "title": "Margins", - "type": "object", - "additionalProperties": false - }, - "MarginsForClassic": { - "description": "This class is a data model for the margins.", - "properties": { + }, + "highlights_area": { + "allOf": [ + { + "$ref": "#/$defs/HighlightsAreaMargins" + } + ], + "default": { + "left": "0.4 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "description": "Highlights area margins.", + "title": "Highlights Area Margins" + }, "page": { "allOf": [ { @@ -1120,10 +1049,10 @@ } ], "default": { - "top": "2 cm", "bottom": "2 cm", "left": "2 cm", - "right": "2 cm" + "right": "2 cm", + "top": "2 cm" }, "description": "Page margins.", "title": "Page Margins" @@ -1135,12 +1064,20 @@ } ], "default": { - "top": "0.3 cm", - "bottom": "0.2 cm" + "bottom": "0.2 cm", + "top": "0.3 cm" }, "description": "Section title margins.", "title": "Section Title Margins" - }, + } + }, + "title": "Margins", + "type": "object" + }, + "MarginsForClassic": { + "additionalProperties": false, + "description": "This class is a data model for the margins.", + "properties": { "entry_area": { "allOf": [ { @@ -1148,28 +1085,14 @@ } ], "default": { - "left_and_right": "0.2 cm", - "vertical_between": "0.2 cm", "date_and_location_width": "4.5 cm", - "education_degree_width": "1 cm" + "education_degree_width": "1 cm", + "left_and_right": "0.2 cm", + "vertical_between": "0.2 cm" }, "description": "Entry area margins.", "title": "Entry Area Margins" }, - "highlights_area": { - "allOf": [ - { - "$ref": "#/$defs/HighlightsAreaMargins" - } - ], - "default": { - "top": "0.10 cm", - "left": "0.4 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "description": "Highlights area margins.", - "title": "Highlights Area Margins" - }, "header": { "allOf": [ { @@ -1177,21 +1100,27 @@ } ], "default": { - "vertical_between_name_and_connections": "0.3 cm", "bottom": "0.3 cm", - "horizontal_between_connections": "0.5 cm" + "horizontal_between_connections": "0.5 cm", + "vertical_between_name_and_connections": "0.3 cm" }, "description": "Header margins.", "title": "Header Margins" - } - }, - "title": "MarginsForClassic", - "type": "object", - "additionalProperties": false - }, - "MarginsForEngineeringresumes": { - "description": "This class is a data model for the margins.", - "properties": { + }, + "highlights_area": { + "allOf": [ + { + "$ref": "#/$defs/HighlightsAreaMargins" + } + ], + "default": { + "left": "0.4 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "description": "Highlights area margins.", + "title": "Highlights Area Margins" + }, "page": { "allOf": [ { @@ -1199,10 +1128,10 @@ } ], "default": { - "top": "2 cm", "bottom": "2 cm", "left": "2 cm", - "right": "2 cm" + "right": "2 cm", + "top": "2 cm" }, "description": "Page margins.", "title": "Page Margins" @@ -1214,12 +1143,20 @@ } ], "default": { - "top": "0.3 cm", - "bottom": "0.2 cm" + "bottom": "0.2 cm", + "top": "0.3 cm" }, "description": "Section title margins.", "title": "Section Title Margins" - }, + } + }, + "title": "MarginsForClassic", + "type": "object" + }, + "MarginsForEngineeringresumes": { + "additionalProperties": false, + "description": "This class is a data model for the margins.", + "properties": { "entry_area": { "allOf": [ { @@ -1227,27 +1164,13 @@ } ], "default": { + "date_and_location_width": "4.5 cm", "left_and_right": "0 cm", - "vertical_between": "0.2 cm", - "date_and_location_width": "4.5 cm" + "vertical_between": "0.2 cm" }, "description": "Entry area margins.", "title": "Entry Area Margins" }, - "highlights_area": { - "allOf": [ - { - "$ref": "#/$defs/HighlightsAreaMarginsForEngineeringresumes" - } - ], - "default": { - "top": "0.10 cm", - "left": "0 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "description": "Highlights area margins.", - "title": "Highlights Area Margins" - }, "header": { "allOf": [ { @@ -1255,60 +1178,63 @@ } ], "default": { - "vertical_between_name_and_connections": "5 pt", "bottom": "5 pt", - "horizontal_between_connections": "10 pt" + "horizontal_between_connections": "10 pt", + "vertical_between_name_and_connections": "5 pt" }, "description": "Header margins.", "title": "Header Margins" + }, + "highlights_area": { + "allOf": [ + { + "$ref": "#/$defs/HighlightsAreaMarginsForEngineeringresumes" + } + ], + "default": { + "left": "0 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "description": "Highlights area margins.", + "title": "Highlights Area Margins" + }, + "page": { + "allOf": [ + { + "$ref": "#/$defs/PageMargins" + } + ], + "default": { + "bottom": "2 cm", + "left": "2 cm", + "right": "2 cm", + "top": "2 cm" + }, + "description": "Page margins.", + "title": "Page Margins" + }, + "section_title": { + "allOf": [ + { + "$ref": "#/$defs/SectionTitleMargins" + } + ], + "default": { + "bottom": "0.2 cm", + "top": "0.3 cm" + }, + "description": "Section title margins.", + "title": "Section Title Margins" } }, "title": "MarginsForEngineeringresumes", - "type": "object", - "additionalProperties": false + "type": "object" }, "ModerncvThemeOptions": { "additionalProperties": false, "description": "This class is the data model of the theme options for the `moderncv` theme.", "properties": { - "theme": { - "const": "moderncv", - "enum": [ - "moderncv" - ], - "title": "Theme", - "type": "string" - }, - "font_size": { - "default": "10pt", - "description": "The font size of the CV. The default value is \"10pt\".", - "enum": [ - "10pt", - "11pt", - "12pt" - ], - "examples": [ - "10pt", - "11pt", - "12pt" - ], - "title": "Font Size", - "type": "string" - }, - "page_size": { - "default": "letterpaper", - "description": "The page size of the CV. The default value is \"letterpaper\".", - "enum": [ - "a4paper", - "letterpaper" - ], - "examples": [ - "a4paper", - "letterpaper" - ], - "title": "Page Size", - "type": "string" - }, "color": { "default": "blue", "description": "The primary color of the CV. The default value is \"blue\".", @@ -1322,7 +1248,6 @@ "purple", "red" ], - "title": "Primary Color", "oneOf": [ { "const": "blue", @@ -1380,7 +1305,14 @@ ], "type": "string" } - ] + ], + "title": "Primary Color" + }, + "content_scale": { + "default": 0.75, + "description": "The scale of the content with respect to the page size. The default value is \"0.75\".", + "title": "Content Scale", + "type": "number" }, "date_width": { "default": "3.8 cm", @@ -1389,11 +1321,41 @@ "title": "Date and Location Column Width", "type": "string" }, - "content_scale": { - "default": 0.75, - "description": "The scale of the content with respect to the page size. The default value is \"0.75\".", - "title": "Content Scale", - "type": "number" + "disable_page_numbers": { + "default": false, + "description": "If \"True\", the page numbers will be disabled. The default value is \"False\".", + "title": "Disable Page Numbers", + "type": "boolean" + }, + "font_size": { + "default": "10pt", + "description": "The font size of the CV. The default value is \"10pt\".", + "enum": [ + "10pt", + "11pt", + "12pt" + ], + "examples": [ + "10pt", + "11pt", + "12pt" + ], + "title": "Font Size", + "type": "string" + }, + "page_size": { + "default": "letterpaper", + "description": "The page size of the CV. The default value is \"letterpaper\".", + "enum": [ + "a4paper", + "letterpaper" + ], + "examples": [ + "a4paper", + "letterpaper" + ], + "title": "Page Size", + "type": "string" }, "show_only_years": { "default": false, @@ -1401,11 +1363,13 @@ "title": "Show Only Years", "type": "boolean" }, - "disable_page_numbers": { - "default": false, - "description": "If \"True\", the page numbers will be disabled. The default value is \"False\".", - "title": "Disable Page Numbers", - "type": "boolean" + "theme": { + "const": "moderncv", + "enum": [ + "moderncv" + ], + "title": "Theme", + "type": "string" } }, "required": [ @@ -1418,11 +1382,6 @@ "additionalProperties": false, "description": "This class is the data model of `NormalEntry`.", "properties": { - "name": { - "description": "The name of the NormalEntry.", - "title": "Name", - "type": "string" - }, "date": { "default": null, "description": "The date field can be filled in YYYY-MM-DD, YYYY-MM, or YYYY formats or as an arbitrary string like \"Fall 2023\".", @@ -1430,51 +1389,15 @@ "2020-09-24", "Fall 2023" ], - "title": "Date", "oneOf": [ { "type": "integer" }, { "type": "string" - }, - { - "type": "null" } - ] - }, - "location": { - "default": null, - "description": "The location of the event.", - "examples": [ - "Istanbul, Türkiye" ], - "title": "Location", - "oneOf": [ - { - "type": "string" - } - ] - }, - "start_date": { - "default": null, - "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", - "examples": [ - "2020-09-24" - ], - "title": "Start Date", - "oneOf": [ - { - "type": "integer" - }, - { - "pattern": "\\d{4}-\\d{2}(-\\d{2})?", - "type": "string" - }, - { - "type": "null" - } - ] + "title": "Date" }, "end_date": { "default": null, @@ -1483,7 +1406,6 @@ "2020-09-24", "present" ], - "title": "End Date", "oneOf": [ { "const": "present", @@ -1498,11 +1420,9 @@ { "pattern": "\\d{4}-\\d{2}(-\\d{2})?", "type": "string" - }, - { - "type": "null" } - ] + ], + "title": "End Date" }, "highlights": { "default": null, @@ -1511,7 +1431,6 @@ "Did this.", "Did that." ], - "title": "Highlights", "oneOf": [ { "items": { @@ -1519,7 +1438,43 @@ }, "type": "array" } - ] + ], + "title": "Highlights" + }, + "location": { + "default": null, + "description": "The location of the event.", + "examples": [ + "Istanbul, Türkiye" + ], + "oneOf": [ + { + "type": "string" + } + ], + "title": "Location" + }, + "name": { + "description": "The name of the NormalEntry.", + "title": "Name", + "type": "string" + }, + "start_date": { + "default": null, + "description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.", + "examples": [ + "2020-09-24" + ], + "oneOf": [ + { + "type": "integer" + }, + { + "pattern": "\\d{4}-\\d{2}(-\\d{2})?", + "type": "string" + } + ], + "title": "Start Date" } }, "required": [ @@ -1532,15 +1487,15 @@ "additionalProperties": false, "description": "This class is the data model of `OneLineEntry`.", "properties": { - "label": { - "description": "The label of the OneLineEntry.", - "title": "Name", - "type": "string" - }, "details": { "description": "The details of the OneLineEntry.", "title": "Details", "type": "string" + }, + "label": { + "description": "The label of the OneLineEntry.", + "title": "Name", + "type": "string" } }, "required": [ @@ -1551,15 +1506,9 @@ "type": "object" }, "PageMargins": { + "additionalProperties": false, "description": "This class is a data model for the page margins.", "properties": { - "top": { - "default": "2 cm", - "description": "The top margin of the page with units. The default value is 2 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Top Margin", - "type": "string" - }, "bottom": { "default": "2 cm", "description": "The bottom margin of the page with units. The default value is 2 cm.", @@ -1580,21 +1529,22 @@ "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Right Margin", "type": "string" + }, + "top": { + "default": "2 cm", + "description": "The top margin of the page with units. The default value is 2 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Top Margin", + "type": "string" } }, "title": "PageMargins", - "type": "object", - "additionalProperties": false + "type": "object" }, "PublicationEntry": { "additionalProperties": false, "description": "This class is the data model of `PublicationEntry`.", "properties": { - "title": { - "description": "The title of the publication.", - "title": "Title of the Publication", - "type": "string" - }, "authors": { "description": "The authors of the publication in order as a list of strings.", "items": { @@ -1603,29 +1553,6 @@ "title": "Authors", "type": "array" }, - "doi": { - "default": null, - "description": "The DOI of the publication.", - "examples": [ - "10.48550/arXiv.2310.03138" - ], - "title": "DOI", - "oneOf": [ - { - "type": "string" - } - ] - }, - "journal": { - "default": null, - "description": "The journal or the conference name.", - "title": "Journal", - "oneOf": [ - { - "type": "string" - } - ] - }, "date": { "default": null, "description": "The date field can be filled in YYYY-MM-DD, YYYY-MM, or YYYY formats or as an arbitrary string like \"Fall 2023\".", @@ -1633,18 +1560,43 @@ "2020-09-24", "Fall 2023" ], - "title": "Date", "oneOf": [ { "type": "integer" }, { "type": "string" - }, - { - "type": "null" } - ] + ], + "title": "Date" + }, + "doi": { + "default": null, + "description": "The DOI of the publication.", + "examples": [ + "10.48550/arXiv.2310.03138" + ], + "oneOf": [ + { + "type": "string" + } + ], + "title": "DOI" + }, + "journal": { + "default": null, + "description": "The journal or the conference name.", + "oneOf": [ + { + "type": "string" + } + ], + "title": "Journal" + }, + "title": { + "description": "The title of the publication.", + "title": "Title of the Publication", + "type": "string" } }, "required": [ @@ -1658,14 +1610,37 @@ "additionalProperties": false, "description": "This class is the data model of the theme options for the `sb2nov` theme.", "properties": { - "theme": { - "const": "sb2nov", - "enum": [ - "sb2nov" + "color": { + "default": "rgb(0,79,144)", + "description": "The primary color of the theme. \nThe color can be specified either with their name (https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,79,144).", + "examples": [ + "Black", + "7fffd4", + "rgb(0,79,144)", + "hsl(270, 60%, 70%)" ], - "title": "Theme", + "format": "color", + "title": "Primary Color", "type": "string" }, + "disable_external_link_icons": { + "default": false, + "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is false.", + "title": "Disable External Link Icons", + "type": "boolean" + }, + "disable_last_updated_date": { + "default": false, + "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is false.", + "title": "Disable Last Updated Date", + "type": "boolean" + }, + "disable_page_numbering": { + "default": false, + "description": "If this option is set to true, then the page numbering will not be shown. The default value is false.", + "title": "Disable Page Numbering", + "type": "boolean" + }, "font": { "default": "Latin Modern Serif", "description": "The font family of the CV. The default value is Latin Modern Serif.", @@ -1690,6 +1665,61 @@ "title": "Font Size", "type": "string" }, + "header_font_size": { + "default": "24 pt", + "description": "The font size of the header (the name of the person). The default value is 24 pt. Unfortunately, sb2nov does not support font sizes bigger than 24 pt.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Header Font Size", + "type": "string" + }, + "last_updated_date_style": { + "default": "Last updated in TODAY", + "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", + "title": "Last Updated Date Style", + "type": "string" + }, + "margins": { + "allOf": [ + { + "$ref": "#/$defs/Margins" + } + ], + "default": { + "entry_area": { + "date_and_location_width": "4.5 cm", + "left_and_right": "0.2 cm", + "vertical_between": "0.2 cm" + }, + "header": { + "bottom": "0.3 cm", + "horizontal_between_connections": "0.5 cm", + "vertical_between_name_and_connections": "0.3 cm" + }, + "highlights_area": { + "left": "0.4 cm", + "top": "0.10 cm", + "vertical_between_bullet_points": "0.10 cm" + }, + "page": { + "bottom": "2 cm", + "left": "2 cm", + "right": "2 cm", + "top": "2 cm" + }, + "section_title": { + "bottom": "0.2 cm", + "top": "0.3 cm" + } + }, + "description": "Page, section title, entry field, and highlights field margins.", + "title": "Margins" + }, + "page_numbering_style": { + "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", + "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", + "title": "Page Numbering Style", + "type": "string" + }, "page_size": { "default": "letterpaper", "description": "The page size of the CV. It can be a4paper or letterpaper. The default value is letterpaper.", @@ -1700,56 +1730,6 @@ "title": "Page Size", "type": "string" }, - "color": { - "default": "rgb(0,79,144)", - "description": "The primary color of the theme. \nThe color can be specified either with their name (https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB value, or HSL value. The default value is rgb(0,79,144).", - "examples": [ - "Black", - "7fffd4", - "rgb(0,79,144)", - "hsl(270, 60%, 70%)" - ], - "format": "color", - "title": "Primary Color", - "type": "string" - }, - "disable_external_link_icons": { - "default": false, - "description": "If this option is set to true, then the external link icons will not be shown next to the links. The default value is false.", - "title": "Disable External Link Icons", - "type": "boolean" - }, - "disable_page_numbering": { - "default": false, - "description": "If this option is set to true, then the page numbering will not be shown. The default value is false.", - "title": "Disable Page Numbering", - "type": "boolean" - }, - "page_numbering_style": { - "default": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", - "description": "The style of the page numbering. The following placeholders can be used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number\n- TOTAL_PAGES: The total number of pages\nThe default value is NAME - Page PAGE_NUMBER of TOTAL_PAGES.", - "title": "Page Numbering Style", - "type": "string" - }, - "disable_last_updated_date": { - "default": false, - "description": "If this option is set to true, then the last updated date will not be shown in the header. The default value is false.", - "title": "Disable Last Updated Date", - "type": "boolean" - }, - "last_updated_date_style": { - "default": "Last updated in TODAY", - "description": "The style of the last updated date. The following placeholder can be used:\n- TODAY: Today's month and year (April 2024)\nThe default value is Last updated in TODAY.", - "title": "Last Updated Date Style", - "type": "string" - }, - "header_font_size": { - "default": "24 pt", - "description": "The font size of the header (the name of the person). The default value is 24 pt. Unfortunately, sb2nov does not support font sizes bigger than 24 pt.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Header Font Size", - "type": "string" - }, "text_alignment": { "default": "justified", "description": "The alignment of the text. The default value is justified.", @@ -1761,41 +1741,13 @@ "title": "Text Alignment", "type": "string" }, - "margins": { - "allOf": [ - { - "$ref": "#/$defs/Margins" - } + "theme": { + "const": "sb2nov", + "enum": [ + "sb2nov" ], - "default": { - "page": { - "bottom": "2 cm", - "left": "2 cm", - "right": "2 cm", - "top": "2 cm" - }, - "section_title": { - "bottom": "0.2 cm", - "top": "0.3 cm" - }, - "entry_area": { - "date_and_location_width": "4.5 cm", - "left_and_right": "0.2 cm", - "vertical_between": "0.2 cm" - }, - "highlights_area": { - "left": "0.4 cm", - "top": "0.10 cm", - "vertical_between_bullet_points": "0.10 cm" - }, - "header": { - "bottom": "0.3 cm", - "horizontal_between_connections": "0.5 cm", - "vertical_between_name_and_connections": "0.3 cm" - } - }, - "description": "Page, section title, entry field, and highlights field margins.", - "title": "Margins" + "title": "Theme", + "type": "string" } }, "required": [ @@ -1805,26 +1757,26 @@ "type": "object" }, "SectionTitleMargins": { + "additionalProperties": false, "description": "This class is a data model for the section title margins.", "properties": { - "top": { - "default": "0.3 cm", - "description": "The top margin of section titles. The default value is 0.3 cm.", - "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", - "title": "Top Margin", - "type": "string" - }, "bottom": { "default": "0.2 cm", "description": "The bottom margin of section titles. The default value is 0.3 cm.", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Bottom Margin", "type": "string" + }, + "top": { + "default": "0.3 cm", + "description": "The top margin of section titles. The default value is 0.3 cm.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Top Margin", + "type": "string" } }, "title": "SectionTitleMargins", - "type": "object", - "additionalProperties": false + "type": "object" }, "SocialNetwork": { "additionalProperties": false, @@ -1861,6 +1813,8 @@ "type": "object" } }, + "$id": "https://raw.githubusercontent.com/sinaatalay/rendercv/main/schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "description": "RenderCV data model.", "properties": { @@ -1875,18 +1829,14 @@ }, "design": { "default": { - "theme": "classic", - "font": "Source Sans 3", - "font_size": "10pt", - "page_size": "letterpaper", "color": "#004f90", "disable_external_link_icons": false, - "disable_page_numbering": false, - "page_numbering_style": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", "disable_last_updated_date": false, - "last_updated_date_style": "Last updated in TODAY", + "disable_page_numbering": false, + "font": "Source Sans 3", + "font_size": "10pt", "header_font_size": "30 pt", - "text_alignment": "justified", + "last_updated_date_style": "Last updated in TODAY", "margins": { "entry_area": { "date_and_location_width": "4.5 cm", @@ -1915,7 +1865,11 @@ "top": "0.3 cm" } }, - "show_timespan_in": [] + "page_numbering_style": "NAME - Page PAGE_NUMBER of TOTAL_PAGES", + "page_size": "letterpaper", + "show_timespan_in": [], + "text_alignment": "justified", + "theme": "classic" }, "description": "The design information of the CV. The default is the classic theme.", "discriminator": { @@ -1961,7 +1915,5 @@ "cv" ], "title": "RenderCV", - "type": "object", - "$id": "https://raw.githubusercontent.com/sinaatalay/rendercv/main/schema.json", - "$schema": "http://json-schema.org/draft-07/schema#" + "type": "object" } \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index d59e0ed..6eead83 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -283,6 +283,7 @@ def rendercv_filled_curriculum_vitae_data_model( dm.SocialNetwork(network="GitHub", username="johndoe"), dm.SocialNetwork(network="Instagram", username="johndoe"), dm.SocialNetwork(network="Orcid", username="0000-0000-0000-0000"), + dm.SocialNetwork(network="Google Scholar", username="F8IyYrQAAAAJ"), dm.SocialNetwork(network="Mastodon", username="@johndoe@example"), dm.SocialNetwork(network="Twitter", username="johndoe"), dm.SocialNetwork(network="StackOverflow", username="12323/johndoe"), diff --git a/tests/test_cli.py b/tests/test_cli.py index b7d4606..10a5486 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -11,6 +11,7 @@ import typer.testing import rendercv.cli as cli import rendercv.data_models as dm +from rendercv import __version__ def run_render_command(input_file_path, working_path, extra_arguments=[]): @@ -509,3 +510,46 @@ def test_create_theme_command_theme_already_exists(tmp_path): def test_main_file(): subprocess.run([sys.executable, "-m", "rendercv", "--help"], check=True) + + +def test_get_latest_version_number_from_pypi(): + version = cli.get_latest_version_number_from_pypi() + assert isinstance(version, str) + + +def test_if_welcome_prints_new_version_available(monkeypatch): + monkeypatch.setattr(cli, "get_latest_version_number_from_pypi", lambda: "99999") + import io + import contextlib + + with contextlib.redirect_stdout(io.StringIO()) as f: + cli.welcome() + output = f.getvalue() + + assert "A new version of RenderCV is available!" in output + + +def test_rendercv_version_when_there_is_a_new_version(monkeypatch): + monkeypatch.setattr(cli, "get_latest_version_number_from_pypi", lambda: "99999") + + result = runner.invoke(cli.app, ["--version"]) + + assert "A new version of RenderCV is available!" in result.stdout + + +def test_rendercv_version_when_there_is_not_a_new_version(monkeypatch): + monkeypatch.setattr(cli, "get_latest_version_number_from_pypi", lambda: __version__) + + result = runner.invoke(cli.app, ["--version"]) + + assert __version__ in result.stdout + + +def test_warn_if_new_version_is_available(monkeypatch): + monkeypatch.setattr(cli, "get_latest_version_number_from_pypi", lambda: __version__) + + assert not cli.warn_if_new_version_is_available() + + monkeypatch.setattr(cli, "get_latest_version_number_from_pypi", lambda: "999") + + assert cli.warn_if_new_version_is_available() diff --git a/tests/test_data_models.py b/tests/test_data_models.py index 24cb0ec..0ecb548 100644 --- a/tests/test_data_models.py +++ b/tests/test_data_models.py @@ -450,6 +450,11 @@ def test_invalid_social_networks(network, username): "@myusername", "https://youtube.com/@myusername", ), + ( + "Google Scholar", + "myusername", + "https://scholar.google.com/citations?user=myusername", + ), ], ) def test_social_network_url(network, username, expected_url): diff --git a/tests/testdata/test_generate_latex_file/classic_filled.tex b/tests/testdata/test_generate_latex_file/classic_filled.tex index c99d27b..11c2282 100644 --- a/tests/testdata/test_generate_latex_file/classic_filled.tex +++ b/tests/testdata/test_generate_latex_file/classic_filled.tex @@ -192,6 +192,8 @@ \kern 0.5 cm \mbox{\hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{{\footnotesize\faOrcid}\hspace*{0.13cm}0000-0000-0000-0000}} \kern 0.5 cm + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{{\footnotesize\faGraduationCap}\hspace*{0.13cm}Google Scholar}} + \kern 0.5 cm \mbox{\hrefWithoutArrow{https://example/@johndoe}{{\footnotesize\faMastodon}\hspace*{0.13cm}@johndoe@example}} \kern 0.5 cm \mbox{\hrefWithoutArrow{https://twitter.com/johndoe}{{\footnotesize\faTwitter}\hspace*{0.13cm}johndoe}} diff --git a/tests/testdata/test_generate_latex_file/engineeringresumes_filled.tex b/tests/testdata/test_generate_latex_file/engineeringresumes_filled.tex index 450b079..472aae2 100644 --- a/tests/testdata/test_generate_latex_file/engineeringresumes_filled.tex +++ b/tests/testdata/test_generate_latex_file/engineeringresumes_filled.tex @@ -196,6 +196,10 @@ \kern 5.0 pt% \AND% \kern 5.0 pt% + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{scholar.google.com/citations?user=F8IyYrQAAAAJ}}% + \kern 5.0 pt% + \AND% + \kern 5.0 pt% \mbox{\hrefWithoutArrow{https://example/@johndoe}{example/@johndoe}}% \kern 5.0 pt% \AND% diff --git a/tests/testdata/test_generate_latex_file/moderncv_filled.tex b/tests/testdata/test_generate_latex_file/moderncv_filled.tex index b2328bd..1f3c29f 100644 --- a/tests/testdata/test_generate_latex_file/moderncv_filled.tex +++ b/tests/testdata/test_generate_latex_file/moderncv_filled.tex @@ -51,6 +51,7 @@ \social[github]{johndoe} \social[instagram]{johndoe} \social[orcid]{0000-0000-0000-0000} +\social[google scholar]{F8IyYrQAAAAJ} \social[mastodon]{@johndoe@example} \social[twitter]{johndoe} \social[stackoverflow]{12323/johndoe} diff --git a/tests/testdata/test_generate_latex_file/sb2nov_filled.tex b/tests/testdata/test_generate_latex_file/sb2nov_filled.tex index d98ae64..af5bce6 100644 --- a/tests/testdata/test_generate_latex_file/sb2nov_filled.tex +++ b/tests/testdata/test_generate_latex_file/sb2nov_filled.tex @@ -168,6 +168,8 @@ \kern 0.5 cm \mbox{\hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{\color{black}{\footnotesize\faOrcid}\hspace*{0.13cm}0000-0000-0000-0000}} \kern 0.5 cm + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{\color{black}{\footnotesize\faGraduationCap}\hspace*{0.13cm}Google Scholar}} + \kern 0.5 cm \mbox{\hrefWithoutArrow{https://example/@johndoe}{\color{black}{\footnotesize\faMastodon}\hspace*{0.13cm}@johndoe@example}} \kern 0.5 cm \mbox{\hrefWithoutArrow{https://twitter.com/johndoe}{\color{black}{\footnotesize\faTwitter}\hspace*{0.13cm}johndoe}} diff --git a/tests/testdata/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex b/tests/testdata/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex index c99d27b..11c2282 100644 --- a/tests/testdata/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex +++ b/tests/testdata/test_generate_latex_file_and_copy_theme_files/classic_filled/John_Doe_CV.tex @@ -192,6 +192,8 @@ \kern 0.5 cm \mbox{\hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{{\footnotesize\faOrcid}\hspace*{0.13cm}0000-0000-0000-0000}} \kern 0.5 cm + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{{\footnotesize\faGraduationCap}\hspace*{0.13cm}Google Scholar}} + \kern 0.5 cm \mbox{\hrefWithoutArrow{https://example/@johndoe}{{\footnotesize\faMastodon}\hspace*{0.13cm}@johndoe@example}} \kern 0.5 cm \mbox{\hrefWithoutArrow{https://twitter.com/johndoe}{{\footnotesize\faTwitter}\hspace*{0.13cm}johndoe}} diff --git a/tests/testdata/test_generate_latex_file_and_copy_theme_files/engineeringresumes_filled/John_Doe_CV.tex b/tests/testdata/test_generate_latex_file_and_copy_theme_files/engineeringresumes_filled/John_Doe_CV.tex index 450b079..472aae2 100644 --- a/tests/testdata/test_generate_latex_file_and_copy_theme_files/engineeringresumes_filled/John_Doe_CV.tex +++ b/tests/testdata/test_generate_latex_file_and_copy_theme_files/engineeringresumes_filled/John_Doe_CV.tex @@ -196,6 +196,10 @@ \kern 5.0 pt% \AND% \kern 5.0 pt% + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{scholar.google.com/citations?user=F8IyYrQAAAAJ}}% + \kern 5.0 pt% + \AND% + \kern 5.0 pt% \mbox{\hrefWithoutArrow{https://example/@johndoe}{example/@johndoe}}% \kern 5.0 pt% \AND% diff --git a/tests/testdata/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex b/tests/testdata/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex index b2328bd..1f3c29f 100644 --- a/tests/testdata/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex +++ b/tests/testdata/test_generate_latex_file_and_copy_theme_files/moderncv_filled/John_Doe_CV.tex @@ -51,6 +51,7 @@ \social[github]{johndoe} \social[instagram]{johndoe} \social[orcid]{0000-0000-0000-0000} +\social[google scholar]{F8IyYrQAAAAJ} \social[mastodon]{@johndoe@example} \social[twitter]{johndoe} \social[stackoverflow]{12323/johndoe} diff --git a/tests/testdata/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex b/tests/testdata/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex index d98ae64..af5bce6 100644 --- a/tests/testdata/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex +++ b/tests/testdata/test_generate_latex_file_and_copy_theme_files/sb2nov_filled/John_Doe_CV.tex @@ -168,6 +168,8 @@ \kern 0.5 cm \mbox{\hrefWithoutArrow{https://orcid.org/0000-0000-0000-0000}{\color{black}{\footnotesize\faOrcid}\hspace*{0.13cm}0000-0000-0000-0000}} \kern 0.5 cm + \mbox{\hrefWithoutArrow{https://scholar.google.com/citations?user=F8IyYrQAAAAJ}{\color{black}{\footnotesize\faGraduationCap}\hspace*{0.13cm}Google Scholar}} + \kern 0.5 cm \mbox{\hrefWithoutArrow{https://example/@johndoe}{\color{black}{\footnotesize\faMastodon}\hspace*{0.13cm}@johndoe@example}} \kern 0.5 cm \mbox{\hrefWithoutArrow{https://twitter.com/johndoe}{\color{black}{\footnotesize\faTwitter}\hspace*{0.13cm}johndoe}} diff --git a/tests/testdata/test_generate_markdown_file/classic_filled.md b/tests/testdata/test_generate_markdown_file/classic_filled.md index ffad766..f8fdf61 100644 --- a/tests/testdata/test_generate_markdown_file/classic_filled.md +++ b/tests/testdata/test_generate_markdown_file/classic_filled.md @@ -8,6 +8,7 @@ - GitHub: [johndoe](https://github.com/johndoe) - Instagram: [johndoe](https://instagram.com/johndoe) - Orcid: [0000-0000-0000-0000](https://orcid.org/0000-0000-0000-0000) +- Google Scholar: [F8IyYrQAAAAJ](https://scholar.google.com/citations?user=F8IyYrQAAAAJ) - Mastodon: [@johndoe@example](https://example/@johndoe) - Twitter: [johndoe](https://twitter.com/johndoe) - StackOverflow: [12323/johndoe](https://stackoverflow.com/users/12323/johndoe) diff --git a/tests/testdata/test_generate_markdown_file/engineeringresumes_filled.md b/tests/testdata/test_generate_markdown_file/engineeringresumes_filled.md index ffad766..f8fdf61 100644 --- a/tests/testdata/test_generate_markdown_file/engineeringresumes_filled.md +++ b/tests/testdata/test_generate_markdown_file/engineeringresumes_filled.md @@ -8,6 +8,7 @@ - GitHub: [johndoe](https://github.com/johndoe) - Instagram: [johndoe](https://instagram.com/johndoe) - Orcid: [0000-0000-0000-0000](https://orcid.org/0000-0000-0000-0000) +- Google Scholar: [F8IyYrQAAAAJ](https://scholar.google.com/citations?user=F8IyYrQAAAAJ) - Mastodon: [@johndoe@example](https://example/@johndoe) - Twitter: [johndoe](https://twitter.com/johndoe) - StackOverflow: [12323/johndoe](https://stackoverflow.com/users/12323/johndoe) diff --git a/tests/testdata/test_generate_markdown_file/moderncv_filled.md b/tests/testdata/test_generate_markdown_file/moderncv_filled.md index ffad766..f8fdf61 100644 --- a/tests/testdata/test_generate_markdown_file/moderncv_filled.md +++ b/tests/testdata/test_generate_markdown_file/moderncv_filled.md @@ -8,6 +8,7 @@ - GitHub: [johndoe](https://github.com/johndoe) - Instagram: [johndoe](https://instagram.com/johndoe) - Orcid: [0000-0000-0000-0000](https://orcid.org/0000-0000-0000-0000) +- Google Scholar: [F8IyYrQAAAAJ](https://scholar.google.com/citations?user=F8IyYrQAAAAJ) - Mastodon: [@johndoe@example](https://example/@johndoe) - Twitter: [johndoe](https://twitter.com/johndoe) - StackOverflow: [12323/johndoe](https://stackoverflow.com/users/12323/johndoe) diff --git a/tests/testdata/test_generate_markdown_file/sb2nov_filled.md b/tests/testdata/test_generate_markdown_file/sb2nov_filled.md index ffad766..f8fdf61 100644 --- a/tests/testdata/test_generate_markdown_file/sb2nov_filled.md +++ b/tests/testdata/test_generate_markdown_file/sb2nov_filled.md @@ -8,6 +8,7 @@ - GitHub: [johndoe](https://github.com/johndoe) - Instagram: [johndoe](https://instagram.com/johndoe) - Orcid: [0000-0000-0000-0000](https://orcid.org/0000-0000-0000-0000) +- Google Scholar: [F8IyYrQAAAAJ](https://scholar.google.com/citations?user=F8IyYrQAAAAJ) - Mastodon: [@johndoe@example](https://example/@johndoe) - Twitter: [johndoe](https://twitter.com/johndoe) - StackOverflow: [12323/johndoe](https://stackoverflow.com/users/12323/johndoe) diff --git a/tests/testdata/test_latex_to_pdf/classic_empty.pdf b/tests/testdata/test_latex_to_pdf/classic_empty.pdf index 143f073..c5cbe6d 100644 Binary files a/tests/testdata/test_latex_to_pdf/classic_empty.pdf and b/tests/testdata/test_latex_to_pdf/classic_empty.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/classic_filled.pdf b/tests/testdata/test_latex_to_pdf/classic_filled.pdf index 7154dde..c635829 100644 Binary files a/tests/testdata/test_latex_to_pdf/classic_filled.pdf and b/tests/testdata/test_latex_to_pdf/classic_filled.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/engineeringresumes_empty.pdf b/tests/testdata/test_latex_to_pdf/engineeringresumes_empty.pdf index 57d3cf4..b07c644 100644 Binary files a/tests/testdata/test_latex_to_pdf/engineeringresumes_empty.pdf and b/tests/testdata/test_latex_to_pdf/engineeringresumes_empty.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/engineeringresumes_filled.pdf b/tests/testdata/test_latex_to_pdf/engineeringresumes_filled.pdf index 453e013..a16bc2b 100644 Binary files a/tests/testdata/test_latex_to_pdf/engineeringresumes_filled.pdf and b/tests/testdata/test_latex_to_pdf/engineeringresumes_filled.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/moderncv_empty.pdf b/tests/testdata/test_latex_to_pdf/moderncv_empty.pdf index a6e07d1..f69c2d4 100644 Binary files a/tests/testdata/test_latex_to_pdf/moderncv_empty.pdf and b/tests/testdata/test_latex_to_pdf/moderncv_empty.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/moderncv_filled.pdf b/tests/testdata/test_latex_to_pdf/moderncv_filled.pdf index 2d5d382..65ce7ed 100644 Binary files a/tests/testdata/test_latex_to_pdf/moderncv_filled.pdf and b/tests/testdata/test_latex_to_pdf/moderncv_filled.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/sb2nov_empty.pdf b/tests/testdata/test_latex_to_pdf/sb2nov_empty.pdf index 78e6c32..182ad47 100644 Binary files a/tests/testdata/test_latex_to_pdf/sb2nov_empty.pdf and b/tests/testdata/test_latex_to_pdf/sb2nov_empty.pdf differ diff --git a/tests/testdata/test_latex_to_pdf/sb2nov_filled.pdf b/tests/testdata/test_latex_to_pdf/sb2nov_filled.pdf index d17bc1f..97cf91d 100644 Binary files a/tests/testdata/test_latex_to_pdf/sb2nov_filled.pdf and b/tests/testdata/test_latex_to_pdf/sb2nov_filled.pdf differ diff --git a/tests/testdata/test_markdown_to_html/classic_filled.html b/tests/testdata/test_markdown_to_html/classic_filled.html index 3991d73..d3739f1 100644 --- a/tests/testdata/test_markdown_to_html/classic_filled.html +++ b/tests/testdata/test_markdown_to_html/classic_filled.html @@ -8,6 +8,7 @@
  • GitHub: johndoe
  • Instagram: johndoe
  • Orcid: 0000-0000-0000-0000
  • +
  • Google Scholar: F8IyYrQAAAAJ
  • Mastodon: @johndoe@example
  • Twitter: johndoe
  • StackOverflow: 12323/johndoe
  • diff --git a/tests/testdata/test_markdown_to_html/engineeringresumes_filled.html b/tests/testdata/test_markdown_to_html/engineeringresumes_filled.html index 3991d73..d3739f1 100644 --- a/tests/testdata/test_markdown_to_html/engineeringresumes_filled.html +++ b/tests/testdata/test_markdown_to_html/engineeringresumes_filled.html @@ -8,6 +8,7 @@
  • GitHub: johndoe
  • Instagram: johndoe
  • Orcid: 0000-0000-0000-0000
  • +
  • Google Scholar: F8IyYrQAAAAJ
  • Mastodon: @johndoe@example
  • Twitter: johndoe
  • StackOverflow: 12323/johndoe
  • diff --git a/tests/testdata/test_markdown_to_html/moderncv_filled.html b/tests/testdata/test_markdown_to_html/moderncv_filled.html index 3991d73..d3739f1 100644 --- a/tests/testdata/test_markdown_to_html/moderncv_filled.html +++ b/tests/testdata/test_markdown_to_html/moderncv_filled.html @@ -8,6 +8,7 @@
  • GitHub: johndoe
  • Instagram: johndoe
  • Orcid: 0000-0000-0000-0000
  • +
  • Google Scholar: F8IyYrQAAAAJ
  • Mastodon: @johndoe@example
  • Twitter: johndoe
  • StackOverflow: 12323/johndoe
  • diff --git a/tests/testdata/test_markdown_to_html/sb2nov_filled.html b/tests/testdata/test_markdown_to_html/sb2nov_filled.html index 3991d73..d3739f1 100644 --- a/tests/testdata/test_markdown_to_html/sb2nov_filled.html +++ b/tests/testdata/test_markdown_to_html/sb2nov_filled.html @@ -8,6 +8,7 @@
  • GitHub: johndoe
  • Instagram: johndoe
  • Orcid: 0000-0000-0000-0000
  • +
  • Google Scholar: F8IyYrQAAAAJ
  • Mastodon: @johndoe@example
  • Twitter: johndoe
  • StackOverflow: 12323/johndoe
  • diff --git a/tests/testdata/test_pdf_to_pngs/pngs/classic_filled_1.png b/tests/testdata/test_pdf_to_pngs/pngs/classic_filled_1.png index 914a245..98a55f2 100644 Binary files a/tests/testdata/test_pdf_to_pngs/pngs/classic_filled_1.png and b/tests/testdata/test_pdf_to_pngs/pngs/classic_filled_1.png differ