Skip to content

Commit 20b8df6

Browse files
author
Gerit Wagner
committed
update tei/pdf
1 parent ce82c68 commit 20b8df6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

colrev/env/tei_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,9 @@ def _add_doi_from_pdf_if_not_available(record_dict: dict) -> None:
677677
# curl -v --form input=@./thefile.pdf -H "Accept: application/x-bibtex"
678678
# -d "consolidateHeader=0" localhost:8070/api/processHeaderDocument
679679
def get_record_from_pdf(file_path: Path, *, add_doi_from_pdf: bool = False) -> dict:
680+
"""Get a record dict form a pdf file_path"""
680681
if file_path.suffix != ".pdf":
681-
return
682+
raise ValueError
682683

683684
record_dict: typing.Dict[str, typing.Any] = {
684685
Fields.FILE: str(file_path),

0 commit comments

Comments
 (0)