Overview
TheCONFIG dictionary provides global configuration settings for bormeparser. It is used throughout the library to determine default paths and behavior.
The configuration is read from the file ~/.bormecfg if it exists, otherwise defaults are used.
Import
Configuration Keys
borme_root
The root directory where BORME files are stored by default
Configuration File
bormeparser reads configuration from~/.bormecfg (in your home directory) if it exists. The file should be in INI format:
borme_root:~/.bormes(expanded to your home directory)
Usage
Accessing Configuration
Using with Utility Functions
TheCONFIG dictionary is used by utility functions as the default directory:
Creating a Configuration File
To customize the default BORME storage location, create a~/.bormecfg file:
Configuration Location
The configuration file must be located at:- Linux/macOS:
~/.bormecfg(in your home directory) - Windows:
C:\Users\YourUsername\.bormecfg
The tilde (
~) is automatically expanded to your home directory path.Default Behavior
If no configuration file exists, bormeparser uses sensible defaults:.bormes directory in your home folder by default.
Source Code Reference
The CONFIG implementation can be found inbormeparser/config.py:23-34.
See Also
- Utility Functions - Functions that use CONFIG
- Download Functions - Downloading BORME files
- Installation - Setting up bormeparser