API¶
-
doi.
pdf_to_doi
(filepath, maxlines=None)[source]¶ Try to get DOI from a filepath. It looks for a regex in the binary data and returns the first DOI found, in the hopes that this DOI is the correct one.
- Parameters
- Return type
- Returns
DOI or
None
.
-
doi.
validate_doi
(doi)[source]¶ We check that the DOI can be resolved by official means. If so, we return the resolved URL, otherwise, we return
None
(which means the DOI is invalid).
-
doi.
get_clean_doi
(doi)[source]¶ Check if the DOI is actually a URL and in that case just get the exact DOI.