hcoopmeetbotlogic.config¶
Plugin configuration and parsing.
Module Contents¶
- hcoopmeetbotlogic.config.CONF_FILE = 'HcoopMeetbot.conf'¶
- hcoopmeetbotlogic.config.CONF_SECTION = 'HcoopMeetbot'¶
- hcoopmeetbotlogic.config.LOG_DIR_KEY = 'logDir'¶
- hcoopmeetbotlogic.config.URL_PREFIX_KEY = 'urlPrefix'¶
- hcoopmeetbotlogic.config.PATTERN_KEY = 'pattern'¶
- hcoopmeetbotlogic.config.TIMEZONE_KEY = 'timezone'¶
- hcoopmeetbotlogic.config.USE_CHANNEL_TOPIC_KEY = 'useChannelTopic'¶
- hcoopmeetbotlogic.config.OUTPUT_FORMAT_KEY = 'outputFormat'¶
- hcoopmeetbotlogic.config.LOG_DIR_DEFAULT¶
- hcoopmeetbotlogic.config.URL_PREFIX_DEFAULT = '/'¶
- hcoopmeetbotlogic.config.PATTERN_DEFAULT = '%Y/{name}.%Y%m%d.%H%M'¶
- hcoopmeetbotlogic.config.TIMEZONE_DEFAULT = 'UTC'¶
- hcoopmeetbotlogic.config.USE_CHANNEL_TOPIC_DEFAULT = False¶
- hcoopmeetbotlogic.config.OUTPUT_FORMAT_DEFAULT¶
- class hcoopmeetbotlogic.config.Config¶
Configuration for the plugin.
- output_format¶
The output format to use
- Type:
- output_format: OutputFormat¶
- hcoopmeetbotlogic.config.load_config(logger: logging.Logger | None, conf_path: str) Config ¶
Load configuration from disk.
If conf_path is a directory, then HcoopMeetbot.conf will be loaded from that directory. If conf_path is a file, then that file will be loaded instead. If the entire file doesn’t exist, defaults will be used for all fields.
The configuration on disk may contain any or all of the configuration fields. A default (fallback) value will be used for any field that does not exist.
- Parameters:
logger (Logger) – Python logger instance that should be used during processing
conf_path (str) – Limnoria bot config path to load configuration from, either a file or a directory