diff --git a/rendercv/cli.py b/rendercv/cli.py index 678992b..e337982 100644 --- a/rendercv/cli.py +++ b/rendercv/cli.py @@ -488,6 +488,7 @@ def cli_command_new( data_model_as_dictionary = json.loads(data_model_as_json) yaml_object = ruamel.yaml.YAML() + yaml_object.encoding = "utf-8" yaml_object.indent(mapping=2, sequence=4, offset=2) yaml_object.dump(data_model_as_dictionary, file_path) diff --git a/rendercv/data_models.py b/rendercv/data_models.py index 9c0d7ef..adb9e70 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -1109,6 +1109,7 @@ def get_a_sample_data_model( Returns: RenderCVDataModel: A sample data model. """ + name = name.encode().decode("unicode-escape") sections = { "summary": [ ( @@ -1169,12 +1170,12 @@ def get_a_sample_data_model( location="WA, USA", highlights=[ ( - "Promoted to Lead Student Ambassador in the Fall of 2004, supervised" - " 10 - 15 Student Ambassadors." + "Promoted to Lead Student Ambassador in the Fall of 2004," + " supervised 10 - 15 Student Ambassadors." ), ( - "Created and taught a computer science course, CSE 099: Software" - " Design and Development." + "Created and taught a computer science course, CSE 099:" + " Software Design and Development." ), ], ), @@ -1190,14 +1191,14 @@ def get_a_sample_data_model( " (ctrl-tab) and extended it to tool windows." ), ( - "Created a service to provide gradient across VS and VS add-ins." - " Optimized service via caching." + "Created a service to provide gradient across VS and VS" + " add-ins. Optimized service via caching." ), "Programmer Productivity Research Center (Summers 2001, 2002)", ( - "Built app to compute the similarity of all methods in a code base," - " reduced time from $\\mathcal{O}(n^2)$ to $\\mathcal{O}(n" - " \\log n)$. " + "Built app to compute the similarity of all methods in a code" + " base, reduced time from $\\mathcal{O}(n^2)$ to" + " $\\mathcal{O}(n \\log n)$. " ), ( "Created a test case generation tool that creates random XML" @@ -1213,8 +1214,8 @@ def get_a_sample_data_model( location="WA, USA", highlights=[ ( - "Promoted to Lead Student Ambassador in the Fall of 2004, supervised" - " 10 - 15 Student Ambassadors." + "Promoted to Lead Student Ambassador in the Fall of 2004," + " supervised 10 - 15 Student Ambassadors." ), ], ), @@ -1324,7 +1325,7 @@ def get_a_sample_data_model( if theme == "classic": design = ClassicThemeOptions(theme="classic", show_timespan_in=["Experience"]) else: - design = rendercv_design_validator.validate_python({"theme": theme}) # type: ignore + design = rendercv_design_validator.validate_python({"theme": theme}) # type: ignore return RenderCVDataModel(cv=cv, design=design)