rendercv.data.generator
¶
The rendercv.data.generator
module contains all the functions for generating the JSON
Schema of the input data format and a sample YAML input file.
dictionary_to_yaml(dictionary)
¶
Converts a dictionary to a YAML string.
Parameters:
-
dictionary
(dict
) –The dictionary to be converted to YAML.
Returns:
-
str
(str
) –The YAML string.
Source code in rendercv/data/generator.py
create_a_sample_data_model(name='John Doe', theme='classic')
¶
Return a sample data model for new users to start with.
Parameters:
-
name
(str
, default:'John Doe'
) –The name of the person. Defaults to "John Doe".
Returns:
-
RenderCVDataModel
(RenderCVDataModel
) –A sample data model.
Source code in rendercv/data/generator.py
create_a_sample_yaml_input_file(input_file_path=None, name='John Doe', theme='classic')
¶
Create a sample YAML input file and return it as a string. If the input file path is provided, then also save the contents to the file.
Parameters:
-
input_file_path
(Path
, default:None
) –The path to save the input file. Defaults to None.
-
name
(str
, default:'John Doe'
) –The name of the person. Defaults to "John Doe".
-
theme
(str
, default:'classic'
) –The theme of the CV. Defaults to "classic".
Returns:
-
str
(str
) –The sample YAML input file as a string.
Source code in rendercv/data/generator.py
generate_json_schema()
¶
Generate the JSON schema of RenderCV.
JSON schema is generated for the users to make it easier for them to write the input file. The JSON Schema of RenderCV is saved in the root directory of the repository and distributed to the users with the JSON Schema Store.
Returns:
-
dict
(dict
) –The JSON schema of RenderCV.
Source code in rendercv/data/generator.py
generate_json_schema_file(json_schema_path)
¶
Generate the JSON schema of RenderCV and save it to a file.
Parameters:
-
json_schema_path
(Path
) –The path to save the JSON schema.