ipypublish.sphinx.gls.cache module¶
caching of the bibglossaries
Originally adapted from: https://github.com/mcmtroffaes/sphinxcontrib-bibtex
-
class
ipypublish.sphinx.gls.cache.BibfileCache(mtime, data)[source]¶ Bases:
ipypublish.sphinx.gls.cache.BibfileCacheContains information about a parsed .bib file.
-
data¶ A ipypublish.bib2glossary.BibGlossDB instance
-
-
class
ipypublish.sphinx.gls.cache.BibliographyCache(bibfiles, encoding, style, unsorted, labels, plurals, filter_, keyprefix)[source]¶ Bases:
ipypublish.sphinx.gls.cache.BibliographyCacheContains information about a bibliography directive.
-
bibfiles¶ A
listofstrs containing the .bib file names (relative to the top source folder) that contain the references.
-
encoding¶ The encoding of the glossary file.
-
style¶ The glossary style.
-
unsorted¶ If True the glossary terms will be sorted by order of use, rather than alphabetically
-
labels¶ Maps citation keys to their final labels.
-
plurals¶ Maps citation keys to their final pluralised labels.
-
keyprefix¶ This bibliography’s string prefix for citation keys.
-
-
class
ipypublish.sphinx.gls.cache.Cache[source]¶ Bases:
objectGlobal bibgloss extension information cache. Stored in
app.env.bibgloss_cache, so must be picklable.-
bibfiles= None¶ A
dictmapping .bib file names (relative to the top source folder) toBibfileCacheinstances.
-
get_all_cited_keys()[source]¶ Yield all citation keys, sorted first by document (alphabetical), then by citation order in the document.
-
get_bibliography_cache(docname, id_)[source]¶ Return
BibliographyCachewith id id_ in document docname.
-
get_bibliography_entries(docname, id_, warn)[source]¶ Return filtered bibliography entries, sorted by citation order.
-
get_cited_docnames(key)[source]¶ Return the docnames from which the given key is cited.
- Parameters
key (
str) – The citation key.
-
purge(docname)[source]¶ Remove all information related to docname.
- Parameters
docname (
str) – The document name.
-
set_bibliography_cache(docname, id_, bibcache)[source]¶ Register bibcache (
BibliographyCache) with id id_ for document docname.
-