pdstools.utils.report_utils._filenames¶
Filename generation and resource copying for report rendering.
Functions¶
|
Generate the output filename based on the report parameters. |
|
Copy the report quarto file to the temporary directory. |
|
Copy report resources from the reports directory to specified destinations. |
Module Contents¶
- get_output_filename(name: str | None, report_type: str, model_id: str | None = None, output_type: str = 'html') str¶
Generate the output filename based on the report parameters.
If
namealready ends with.{output_type}(case-insensitive), it is treated as a full filename and returned verbatim (after replacing spaces with underscores). Otherwise the filename is composed fromreport_type,name, andmodel_idwith the extension appended.
- copy_quarto_file(qmd_file: str, temp_dir: pathlib.Path) None¶
Copy the report quarto file to the temporary directory.
- Parameters:
qmd_file (str) – Name of the Quarto markdown file to copy
temp_dir (Path) – Destination directory to copy files to
- Return type:
None