Expand description
Workspace root, show slug, active show, and the two on-disk layouts.
Port of the path half of models.py.
Constants§
- DEFAULT_
SLUG - Fallback slug when neither
--shownorproject.jsonnames one.
Functions§
- active_
show - Slug from
.active_show, orNonewhen the file is absent. - code_
root $XIL_CODEROOT— where the software and the heavy model venvs live.- derive_
paths - Auto-detect the layout: legacy when the cast config exists only at the legacy root location, normalized otherwise.
- derive_
paths_ legacy - Legacy layout (pre-0.1.8) — what
xil migrate-workspacemoves away from. - derive_
paths_ 🔒new - Normalized layout (0.1.8+).
- episode_
tag S01E01when a season is known,E01otherwise.- expanduser 🔒
~expansion the wayPath.expanduser()does it: only a leading~.- python_
str - How Python’s
str()would render a scalar JSON value. Only the cases that can plausibly land in a config file are covered. - read_
json_ 🔒object - read_
project - Parsed
project.json, or an empty object when absent. - resolve 🔒
Path.resolve()— absolute, symlinks followed when the path exists.- resolve_
project_ type - Content type from
project.json, defaulting to"podcast". - resolve_
season - Season number from an explicit value, else
project.json, elseNone. - resolve_
season_ title - Season/arc title from an explicit value, else
project.json, elseNone. An empty string in the file counts as absent (Python:or None). - resolve_
slug - Slug from
--show, elseproject.json’sshow, elseDEFAULT_SLUG. - resolve_
venv_ python resolve_venv_python(venv_name, explicit)— the interpreter of an optional local-model venv (venv-whisper,venv-chatterbox, …).- set_
active_ show - Write
slugto.active_showin the workspace root (no trailing newline, same as Python’swrite_text). - show_
slug - Show title → filesystem-safe slug: lowercase, keep only
[a-z0-9]. - type_
defaults - Per-type production defaults: gap between dialogue stems and a stability
hint.
stabilityisNonewhere Python hasNone. - workspace_
root - The active workspace root:
$XIL_PROJECTROOT(expanded, resolved), else the current directory.
Type Aliases§
- Paths
- Every standard pipeline path for one episode, keyed by the same logical names as the Python dict.