Settings Model¶
PatcherSettings is the single home for Patcher’s on-disk configuration: UI
branding (UIDefaults), the matching toggle, Integrations, ignored titles,
and the recorded interpreter path. It reads and writes
com.liquidzoo.patcher.plist via load() / save(), folding older plist
formats forward on read.
Pydantic models for Patcher’s on-disk configuration.
PatcherSettings is the single source of truth for everything stored in
the property list — UI branding, the matching toggle, integration flags,
ignored titles, and the recorded interpreter path. It owns reading and writing
the plist (load() / save()) and
migrating older on-disk formats forward.
- class UIDefaults(*, header_text: Annotated[str, MinLen(min_length=1)] = 'Default header text', footer_text: Annotated[str, MinLen(min_length=1)] = 'Default footer text', font_name: Annotated[str, MinLen(min_length=1)] = 'Assistant', reg_font_path: str = '', bold_font_path: str = '', header_color: Annotated[str, MinLen(min_length=1)] = '#6432bdff', logo_path: str = '')[source]¶
Default branding values for PDF and HTML reports (header/footer text, fonts, logo, color).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class Integrations(*, installomator: bool = True, homebrew: bool = False, autopkg: bool = False, jai: bool = False)[source]¶
Per-source matching toggles. Only
installomatorandhomebreware wired today.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class PatcherSettings(*, setup_completed: bool = False, enable_matching: bool = True, enable_caching: bool = True, interpreter_path: str = <factory>, UserInterfaceSettings: UIDefaults = <factory>, integrations: Integrations = <factory>, ignored_titles: list[str] = <factory>)[source]¶
Patcher’s complete on-disk configuration, backed by the property list.
The single home for everything persisted between runs: setup completion, the matching and caching toggles, the interpreter path recorded for the #68 preflight, UI branding, integration flags, and the user’s ignored-title patterns.
load()reads and migrates the plist;save()writes the whole model back; the_migratevalidator folds every older format forward in one place.Added in version 3.3.0: Replaces the former
PropertyListManagerandUIConfigManager, consolidating plist I/O and format migration into one model.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
setup_completed (bool)
enable_matching (bool)
enable_caching (bool)
interpreter_path (str)
UserInterfaceSettings (UIDefaults)
integrations (Integrations)
- classmethod load(path: Path = PosixPath('/home/docs/Library/Application Support/Patcher/com.liquidzoo.patcher.plist')) PatcherSettings[source]¶
Read settings from
path, migrating older plist formats forward.A missing file yields a defaults-only instance. When a pre-v2 (nested) plist is detected, a
.bakcopy is written before migrating so the original is never lost.- Parameters:
path (Path)
- Return type: