stepup.reprep.bibsane¶
Sanitize BibTeX files.
BibsaneConfig
¶
The configuration object controling BibSane behavior.
Note that the settings default to the most permissive and least invasive ones. We recommend the opposite settings, but you have to switch knowingly in the config file.
Source code in stepup/reprep/bibsane.py
abbreviate_journal = attrs.field(default=None)
class-attribute
instance-attribute
¶
The path to the journal abbreviation cache file.
This must be a path relative to the parent of the configuration file. If no configuration file is provided, it must be relative to the current working directory.
If set, unabbreviated journal names will be substituted by their ISO abbreviation, which are generated with pyiso4 and cached in the given file. The main reason for the cache file is to provide a mechanism for customizing abbreviations if pyiso4 does not provide the desired abbreviation.
amend = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to amend inputs and outputs the StepUp workflow.
citation_policies = attrs.field(default=attrs.Factory(dict))
class-attribute
instance-attribute
¶
The field policies (must or may) for each entry type.
drop_entry_types = attrs.field(default=attrs.Factory(list))
class-attribute
instance-attribute
¶
The entry types to drop from the BibTeX database.
duplicate_doi = attrs.field(default=DuplicatePolicy.IGNORE)
class-attribute
instance-attribute
¶
The policy for duplicate DOIs: fail, merge or ignore.
duplicate_id = attrs.field(default=DuplicatePolicy.IGNORE)
class-attribute
instance-attribute
¶
The policy for duplicate BibTeX IDs: fail, merge or ignore.
fix_page_double_hyphen = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to fix the page ranges for which no double hyphen is used.
normalize_doi = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to normalize the DOIs in the entries.
normalize_names = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to normalize the author and editor names.
(This currently broken.)
normalize_whitespace = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to normalize the whitespace in the field values.
preambles_allowed = attrs.field(default=True)
class-attribute
instance-attribute
¶
Set to False
to disallow @preamble entries in the BibTeX database.
root = attrs.field()
class-attribute
instance-attribute
¶
The parent directory of the configuration file.
sort = attrs.field(default=False)
class-attribute
instance-attribute
¶
Set to True
to sort the entries by year and first author.
The sort key is {year}{first author lowercase last name}
.
from_file(fn_yaml, amend=False)
classmethod
¶
Instantiate a configuration from a YAML config file.