bibclean.config.load_config

bibclean.config.load_config(file)[source]

Load the bibclean configuration form a TOML file.

The loaded configuration is merged with the default TOML configuration, overwriting the defaults with the provided configuration.

Parameters:
filestr | Path

Path to the TOML file containing the tool.bibclean and 'tool.bibclean.entry_type' sections.

Returns:
required_fieldsdict

Required fields for each entry type. If None, a default configuration is loaded. The dictionary is defined with the entry-type as key (str) and the required fields as value (set of str).

keep_fieldsdict

Fields to keep for each entry type. If None, a default configuration is loaded. The dictionary is defined with the entry-type as key (str) and the required fields as value (set of str).

excludelist of str

List of entries to ignore. An entry is specified by its cite key.