swh.indexer.bibtex module#

swh.indexer.bibtex.TMP_ROOT_URI_PREFIX = 'https://www.softwareheritage.org/schema/2022/indexer/tmp-node/'#

IRI used for skolemization; it is not used outside codemeta_to_bibtex().

class swh.indexer.bibtex.BibTeXWithMacroWriter(encoding=None)[source]#

Bases: Writer

quote(s)[source]#
>>> w = BibTeXWithMacroWriter()
>>> print(w.quote(f'{MACRO_PREFIX}:jan'))
jan
swh.indexer.bibtex.codemeta_to_bibtex(doc: Dict[str, Any], swhid: QualifiedSWHID | None = None) str[source]#
swh.indexer.bibtex.cff_to_bibtex(content: str, swhid: QualifiedSWHID | None = None) str[source]#