mirror of https://github.com/eyhc1/rendercv.git
update docstrings
This commit is contained in:
parent
cdbbc46b5c
commit
dfa23b9fbb
|
@ -411,7 +411,7 @@ def cli_command_render(
|
|||
help="Use the local LaTeX installation instead of the RenderCV's TinyTeX.",
|
||||
),
|
||||
):
|
||||
"""Generate a LaTeX CV from a YAML input file.
|
||||
"""Generate a $\\LaTeX$ CV from a YAML input file.
|
||||
|
||||
Args:
|
||||
input_file_path (str): Path to the YAML input file as a string.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
This module contains all the necessary classes to store CV data. These classes are called
|
||||
data models. The YAML input file is transformed into instances of these classes (i.e.,
|
||||
the input file is read) with the [`read_input_file`](#read_input_file) function.
|
||||
RenderCV utilizes these instances to generate a LaTeX file which is then rendered into a
|
||||
RenderCV utilizes these instances to generate a $\\LaTeX$ file which is then rendered into a
|
||||
PDF file.
|
||||
|
||||
The data models are initialized with data validation to prevent unexpected bugs. During
|
||||
|
@ -1061,14 +1061,14 @@ def read_input_file(
|
|||
file_path: pathlib.Path,
|
||||
) -> RenderCVDataModel:
|
||||
"""Read the input file and return two instances of RenderCVDataModel. The first
|
||||
instance is the data model with LaTeX strings and the second instance is the data
|
||||
instance is the data model with $\\LaTeX$ strings and the second instance is the data
|
||||
model with markdown strings.
|
||||
|
||||
Args:
|
||||
file_path (str): The path to the input file.
|
||||
|
||||
Returns:
|
||||
tuple[RenderCVDataModel, RenderCVDataModel]: The data models with LaTeX and
|
||||
tuple[RenderCVDataModel, RenderCVDataModel]: The data models with $\\LaTeX$ and
|
||||
markdown strings.
|
||||
"""
|
||||
# check if the file exists:
|
||||
|
|
|
@ -28,7 +28,7 @@ from . import data_models as dm
|
|||
class TemplatedFile:
|
||||
"""This class is a base class for LaTeXFile and MarkdownFile classes. It contains
|
||||
the common methods and attributes for both classes. These classes are used to
|
||||
generate the LaTeX and Markdown files with the data model and Jinja2 templates.
|
||||
generate the $\\LaTeX$ and Markdown files with the data model and Jinja2 templates.
|
||||
|
||||
Args:
|
||||
data_model (dm.RenderCVDataModel): The data model.
|
||||
|
@ -411,7 +411,7 @@ def markdown_to_latex(markdown_string: str) -> str:
|
|||
markdown_string (str): The markdown string to convert.
|
||||
|
||||
Returns:
|
||||
str: The LaTeX string.
|
||||
str: The $\\LaTeX$ string.
|
||||
"""
|
||||
# convert links
|
||||
links = re.findall(r"\[([^\]\[]*)\]\((.*?)\)", markdown_string)
|
||||
|
@ -539,7 +539,7 @@ def make_matched_part_something(
|
|||
|
||||
Args:
|
||||
value (str): The string to make something.
|
||||
something (str): The LaTeX command to use.
|
||||
something (str): The $\\LaTeX$ command to use.
|
||||
match_str (str): The string to match.
|
||||
Returns:
|
||||
str: The string with the matched part something.
|
||||
|
|
Loading…
Reference in New Issue