s6.utils.path_patternsΒΆ

Reusable helpers for expanding path placeholders in CLI arguments.

class s6.utils.path_patterns.PathPatternParser(substitutions: Mapping[str, str])

Bases: object

Expand $token or ${token} placeholders inside a path string.

property substitutions: Mapping[str, str]

Return the configured placeholder mapping.

classmethod for_track(*, now: datetime | None = None, input_source: str = 'gst', config_path: str | None = None, pid: int | None = None, hostname: str | None = None, run_id: str | None = None) PathPatternParser

Build the default placeholder mapping for s6 track outputs.

parse(value: str) str

Expand placeholders in value using the parser mapping.