rendercv.renderer.renderer
¶
The rendercv.renderer.renderer
module contains the necessary functions for rendering
$\LaTeX$, PDF, Markdown, HTML, and PNG files from the RenderCVDataModel
object.
copy_theme_files_to_output_directory(theme_name, output_directory_path)
¶
Copy the auxiliary files (all the files that don't end with .j2.tex
and .py
)
of the theme to the output directory. For example, a theme can have custom
fonts, and the $\LaTeX$ needs it. If the theme is a custom theme, then it will be
copied from the current working directory.
Parameters:
-
theme_name
(str
) –The name of the theme.
-
output_directory_path
(Path
) –Path to the output directory.
Source code in rendercv/renderer/renderer.py
create_a_latex_file(rendercv_data_model, output_directory)
¶
Render the $\LaTeX$ file with the given data model and write it to the output directory.
Parameters:
-
rendercv_data_model
(RenderCVDataModel
) –The data model.
-
output_directory
(Path
) –Path to the output directory.
Returns:
-
Path
–The path to the generated $\LaTeX$ file.
Source code in rendercv/renderer/renderer.py
create_a_markdown_file(rendercv_data_model, output_directory)
¶
Render the Markdown file with the given data model and write it to the output directory.
Parameters:
-
rendercv_data_model
(RenderCVDataModel
) –The data model.
-
output_directory
(Path
) –Path to the output directory.
Returns:
-
Path
–The path to the rendered Markdown file.
Source code in rendercv/renderer/renderer.py
create_a_latex_file_and_copy_theme_files(rendercv_data_model, output_directory)
¶
Render the $\LaTeX$ file with the given data model in the output directory and copy the auxiliary theme files to the output directory.
Parameters:
-
rendercv_data_model
(RenderCVDataModel
) –The data model.
-
output_directory
(Path
) –Path to the output directory.
Returns:
-
Path
–The path to the rendered $\LaTeX$ file.
Source code in rendercv/renderer/renderer.py
render_a_pdf_from_latex(latex_file_path, local_latex_command=None)
¶
Run TinyTeX with the given $\LaTeX$ file to render the PDF.
Parameters:
-
latex_file_path
(Path
) –The path to the $\LaTeX$ file.
Returns:
-
Path
–The path to the rendered PDF file.
Source code in rendercv/renderer/renderer.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
render_pngs_from_pdf(pdf_file_path)
¶
Render a PNG file for each page of the given PDF file.
Parameters:
-
pdf_file_path
(Path
) –The path to the PDF file.
Returns:
-
list[Path]
–The paths to the rendered PNG files.
Source code in rendercv/renderer/renderer.py
render_an_html_from_markdown(markdown_file_path)
¶
Render an HTML file from a Markdown file with the same name and in the same
directory. It uses rendercv/themes/main.j2.html
as the Jinja2 template.
Parameters:
-
markdown_file_path
(Path
) –The path to the Markdown file.
Returns:
-
Path
–The path to the rendered HTML file.