BibTexFile module¶
BibTexFile class¶
-
class
biblib.
BibTexFile
(filename)[source]¶ This is the BibTeX file class.
It is derived from the
BibDB
class including a readerdb_from_file()
and writerdb_to_file()
function. It also supports thewith
statement.Parameters: filename (str) – input BibTeX file Returns: BibTeX file object Return type: BibTexFile -
reload
()[source]¶ Reload the BibTeX file.
Note
The database will overwritten and all changes will get lost!
-
has_changed
()[source]¶ Check if database have changed (since last saving).
Returns: True | False Return type: bool
-
close
()[source]¶ Alternative to the
BibTexFile.save()
function.
-
BibTexFileSet class¶
-
class
biblib.
BibTexFileSet
[source]¶ -
-
values
()[source]¶ Returns a list of BibTexFile object stored in the set.
Returns: list of BibTexFile object Return type: list
-
items
()[source]¶ Returns a list of sets containing alias/ BibTexFile object.
Returns: list of sets alias/ BibTexFile object Return type: list
-
__getitem__
(key)[source]¶ Returns the BibTexFile object with the given alias in the set.
Parameters: key (str) – alias Returns: BibTeX file object Return type: BibTexFile Raises: NameError – if alias did not exist in set
-
__setitem__
(key, value)[source]¶ Add/set a BibTeX file object with an alias to the set.
Parameters: - key (str) – alias
- value (BibTexFile) – BibTeX file object
Raises: - TypeError – if value is not of a valid object type
- KeyError – if alias already exists in set
-
__delitem__
(key)[source]¶ Deletes a BibTeX file object from the set.
Parameters: key (str) – alias Raises: NameError – if citation-key did not exist in database
-
has_doi
(doi)[source]¶ Check if a given DOI is known.
Parameters: doi (str) – digital object identifier (DOI) Returns: True | False Return type: bool
-
dois
¶ Returns a dictionary with doi as key and [alias, citation-key] list as value.
-
ckeys
¶ Returns a dictionary with citation-key as key and alias as value.
-
__weakref__
¶ list of weak references to the object (if defined)
-