alpaca.biblio
Classes
- class alpaca.biblio.biblio.Citations
- generate_bibtex(filepath: str | PathLike | TextIOBase)
Generates a bibtex file with the citations registered in the object.
This method uses the inspirehep.net API to generate the bibtex file.
Arguments
- filepath: str | PathLike | TextIOBase
The path to the file where the bibtex will be written. If a file-like object is passed, the bibtex will be written to it. If a string is passed, the bibtex will be written to a file with the given name.
Functions
- alpaca.biblio.citations_context(merge: bool = True)
Creates a context manager to gather citations in a block of code.
Arguments
- merge: bool (default: True)
If True, the citations gathered in the block will be merged with the citations outside the block. If False, the citations gathered in the block wil be erased after the block.
Usage
>>> from alpaca.citations import citations, citations_context >>> with citations_context(): >>> # Code that uses alpaca >>> citations.generate_bibtex('my_bibtex.bib')
Objects
- alpaca.biblio.citations
Object that stores the citations used in ALPaca.