ipypublish.bib2glossary.classes module¶
-
class
ipypublish.bib2glossary.classes.
BibGlossDB
[source]¶ Bases:
collections.abc.MutableMapping
-
static
guess_path
(path)[source]¶ guess the path of a bib file, with or without a file extension, from the available files in the path folder
-
load
(path, encoding='utf8')[source]¶ load a file, the type will be guessed from the extension, or (if no extension is given), the available files in the path folder
-
load_bib
(text_str=None, path=None, bibdb=None, encoding='utf8', ignore_nongloss_types=False, ignore_duplicates=False)[source]¶ load a bib file
- Parameters
text_str=None (str or None) – string representing the bib file contents
bibdb=None (bibtexparser.bibdatabase.BibDatabase or None) –
encoding="utf8" (str) – bib file encoding
ignore_nongloss_types (bool) – if False, a KeyError will be raised for non-gloss types
ignore_duplicates (bool) – if False, a KeyError will be raised if multiple entries are found with the same key, otherwise only the first entry will be used
-
load_tex
(text_str=None, path=None, encoding='utf8', skip_ioerrors=False, ignore_unknown_types=True)[source]¶ load a tex file
- Parameters
text_str=None (str or None) – string representing the bib file contents
bibdb=None (bibtexparser.bibdatabase.BibDatabase or None) –
encoding="utf8" (str) – bib file encoding
skip_ioerrors (bool) – if False, an IOError will be raised if newglossaryterm or newacronym is badly formatted
ignore_unknown_types (bool) – if True, strip unknown types, otherwise raise a ValueError
Notes
the texsoup package is required.
if a newglossaryterm has field ‘type={symbols}’, then it will be loaded as a symbol
-
static