Chapter 3. Customization

Table of Contents
Files involved
The Config module

The configuration system is heavily based on python's module system. The configuration files are standard pybliographer scripts (that is, python code making use of pybliographer extra classes and functions), whose single special feature is to be automatically parsed at startup or when needed.

Files involved

The first file to be parsed is ${prefix}/share/pybliographer/pybrc.py. It serves as a bootstrap for the general configration mechanism, and defines:

A configuration directory holds a list of files which are parsed when needed. For example, if a method requires some configuration data for the bibtex module, it will import the corresponding file in this directory.

This mechanism allows more flexibility to add new formats: the new format can be installed with a default configuration without messing with the global configuration file. In addition, the program imports only what is needed, decreasing its startup time.

Finally, if the user provides a file called .pybrc.py in its home directory, this file is then parsed. Of course it can also define a private configuration directory, and override what has been defined before.