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
class hcoopmeetbotlogic.config.OutputFormat

Bases: str, enum.Enum

Legal output formats.

HTML = 'HTML'
hcoopmeetbotlogic.config.OUTPUT_FORMAT_DEFAULT
class hcoopmeetbotlogic.config.Config

Configuration for the plugin.

conf_file

Path to the file where configuration was sourced from

Type:

Optional[str]

log_dir

Absolute path where meeting logs will be written

Type:

str

url_prefix

URL prefix to place on generated links to logfiles

Type:

str

pattern

Pattern for files generated in logFileDir

Type:

str

timezone

Timezone string, any value valid for pytz

Type:

str

use_channel_topic

Whether the bot should attempt to use the channel topic

Type:

bool

output_format

The output format to use

Type:

OutputFormat

conf_file: str | None
log_dir: str
url_prefix: str
pattern: str
timezone: str
use_channel_topic: bool
output_format: OutputFormat
hcoopmeetbotlogic.config.load_config(logger: logging.Logger | None, conf_dir: str) Config

Load configuration from disk.

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. If the entire file doesn’t exist, defaults will be used for all fields.

Parameters:
  • logger (Logger) – Python logger instance that should be used during processing

  • conf_dir (str) – Limnoria bot conf directory to load configuration from