dvcurator.pdf
¶
Module Contents¶
Functions¶
|
Recursively find PDFs in a folder |
|
Generate the string for the PDF metadata field "author". Separate with semicolons between full names for > 1 author |
|
Write metadata to PDF files |
|
Standardize PDF metadata according to QDR specifications |
- dvcurator.pdf.find_pdfs(path)¶
Recursively find PDFs in a folder
- Parameters:
path (Path, as String) – Path to look for PDFs under
- Returns:
List of PDFs, as relative paths
- Return type:
list[str]
- dvcurator.pdf.combine_author_names(citation)¶
Generate the string for the PDF metadata field “author”. Separate with semicolons between full names for > 1 author
- Parameters:
citation (list[str]) – Project citation, generated by get_citation()
- Returns:
Author names formatted to input as PDF metadata
- Return type:
None
- dvcurator.pdf.write_metadata(folder, author)¶
Write metadata to PDF files
- Parameters:
folder (string) – folder of the PDF files
author (string) – contents of the new author metadata field
- dvcurator.pdf.standard_metadata(folder, citation)¶
Standardize PDF metadata according to QDR specifications
- Parameters:
folder (Path, as string) – Folder with PDFs to edit (searches recursively)
citation (list[str]) – Project citation, generated by get_citation()
- Returns:
Path to new folder with the standardized PDF files, or None if error
- Return type:
Path, as string