Configuration¶
obsidian_export.config
¶
Configuration module for obsidian-export pipeline.
Re-exports all public names so that
from obsidian_export.config import X continues to work.
build_config
¶
Build ConvertConfig from a raw dict. Resolve relative paths if config_dir given.
Source code in obsidian_export/config/loader.py
deep_merge
¶
Recursively merge override into base. override wins on conflicts.
Source code in obsidian_export/config/loader.py
default_config
¶
load_config
¶
Load config from YAML file, merging on top of bundled defaults.
Users can write minimal YAML with only overrides. Relative paths in config are resolved relative to the config file's directory.
Source code in obsidian_export/config/loader.py
load_default_yaml
¶
parse_brand_colors
¶
Parse brand_colors dict {name: [r,g,b]} into tuple of (name, r, g, b).
Source code in obsidian_export/config/loader.py
parse_heading_styles
¶
Parse list of heading style dicts into tuple of HeadingStyle.
Source code in obsidian_export/config/loader.py
parse_title_style
¶
Parse title style dict into TitleStyle, or None if absent.
Source code in obsidian_export/config/loader.py
parse_unicode_chars
¶
Parse unicode_chars dict {char: latex} into tuple of (char, latex).
resolve_path
¶
Resolve a relative path string against config_dir. Return as string.
Source code in obsidian_export/config/loader.py
validate_from_format
¶
Validate pandoc from_format against safe base formats and extensions.
Raises ConfigValueError if the base format is not allowlisted, any extension name is malformed, or a dangerous extension is enabled.
Source code in obsidian_export/config/validators.py
validate_pandoc_variable
¶
Validate a string that will be passed as a pandoc --variable value.
Allows alphanumeric characters and limited punctuation (commas, equals, dots, hyphens, underscores, spaces). Raises ConfigValueError on mismatch.
Source code in obsidian_export/config/validators.py
validate_url_strategy
¶
Validate url_strategy against the allowlist of supported strategies.
Raises ConfigValueError if the value is not recognised.