undr.bibtex
#
BibTeX downloading and parsing.
Overview#
Functions#
Downloads and formats BibTeX from https://dx.doi.org/. |
Module Contents#
- undr.bibtex.from_doi(doi: str, pretty: bool, timeout: float) str #
Downloads and formats BibTeX from https://dx.doi.org/.
- Parameters:
doi (str) – Digital object identifier (DOI) string starting with
10.
.pretty (bool) – Whether to correct line breaks and indents. Otherwise, this function returns the raw reponse from https://dx.doi.org/.
timeout (float) – Request timeout in seconds.
- Raises:
requests.exceptions.HTTPError – if a network error occurs (unreachable server, timeout…).
- Returns:
BibTeX entry for the given DOI.
- Return type: