Skip to content

lasagnastack.video_editors

lasagnastack.video_editors

VideoEditorAdapter

Bases: ABC

Interface for translating a cut list into a video editor draft project.

build_draft abstractmethod

build_draft(
    cut_list: CutList,
    draft_parent: Path,
    folder_name: str,
    display_name: str,
    input_dir: Path,
    reel_style_sheet: ReelStyleSheet | None = None,
) -> Path

Translate cut_list into a draft project at draft_parent/folder_name.

Parameters:

Name Type Description Default
cut_list CutList

Approved cut list from Stage 4.

required
draft_parent Path

Directory that will contain the new draft subfolder.

required
folder_name str

Name for the new draft subfolder.

required
display_name str

Human-readable project name written into the draft.

required
input_dir Path

Folder containing original source clips.

required
reel_style_sheet ReelStyleSheet | None

Optional visual styling from Stage 5.

None

Returns:

Type Description
Path

Path to the created draft folder.

Source code in src/lasagnastack/video_editors/base.py
@abstractmethod
def build_draft(
    self,
    cut_list: CutList,
    draft_parent: Path,
    folder_name: str,
    display_name: str,
    input_dir: Path,
    reel_style_sheet: ReelStyleSheet | None = None,
) -> Path:
    """Translate cut_list into a draft project at draft_parent/folder_name.

    Args:
        cut_list: Approved cut list from Stage 4.
        draft_parent: Directory that will contain the new draft subfolder.
        folder_name: Name for the new draft subfolder.
        display_name: Human-readable project name written into the draft.
        input_dir: Folder containing original source clips.
        reel_style_sheet: Optional visual styling from Stage 5.

    Returns:
        Path to the created draft folder.
    """
    ...

export abstractmethod

export(
    draft_path: Path, input_dir: Path, cut_list: CutList
) -> Path | None

Export the draft into the editor's native project directory.

Parameters:

Name Type Description Default
draft_path Path

Path to the locally-built draft folder.

required
input_dir Path

Folder containing original source clips.

required
cut_list CutList

Cut list (used to enumerate unique source files).

required

Returns:

Type Description
Path | None

Path to the draft inside the editor app, or None if not installed.

Source code in src/lasagnastack/video_editors/base.py
@abstractmethod
def export(
    self,
    draft_path: Path,
    input_dir: Path,
    cut_list: CutList,
) -> Path | None:
    """Export the draft into the editor's native project directory.

    Args:
        draft_path: Path to the locally-built draft folder.
        input_dir: Folder containing original source clips.
        cut_list: Cut list (used to enumerate unique source files).

    Returns:
        Path to the draft inside the editor app, or None if not installed.
    """
    ...