Skip to content

fcpxml-dsl: export presentation subcommand #39

Description

@leogdion

Files

  • Modify Sources/fcpxml-dsl/FCPXMLDSLCommand.swift
  • Modify Sources/fcpxml-dsl/FCPXMLDSLCommand+Export.swift
  • Modify .gitignore

Work

Add a "presentation" case to the export switch (FCPXMLDSLCommand.swift:78-87)
and an exportPresentationCommand, mirroring exportRGBCommand
(FCPXMLDSLCommand.swift:133-144) exactly: optional positional output defaulting to
presentation.fcpxml, plus --project and --version.

Keep this command thin. It parses arguments and invokes
FCPKitDSL.PresentationDocument; the deck itself lives in the library (Issue 4). Do
not re-create a copy of the document here — that is exactly the RGBDocument
duplication Issue 4 cleans up.

Add case "presentation": return "FCPKit Presentation" to defaultProjectName
(FCPXMLDSLCommand.swift:165-176), and update printUsage() — the USAGE block and
the EXAMPLES block both list the export kinds.

The existing export implementations sit inside #if canImport(AVFoundation).
presentation needs no media probing and could live outside that gate, but keep it
inside for consistency with its siblings and to avoid restructuring the conditional.

.gitignore:142-144 lists /transitions.fcpxml and /titles.fcpxml under
"fcpxml-dsl export outputs" but is missing /rgb.fcpxml (an oversight from
e2a64c3). Add both /rgb.fcpxml and /presentation.fcpxml.

Acceptance criteria

  • swift run fcpxml-dsl export presentation presentation.fcpxml writes a valid file.
  • swift run fcpxml-dsl --help lists the new kind in USAGE and EXAMPLES.
  • Neither rgb.fcpxml nor presentation.fcpxml shows up in git status after an
    export run.

Conventions

  • MIT header block on every new file (see Scripts/header.sh).
  • Swift Testing (import Testing, @Test) for new tests, per .claude/agent-notes.md. Include "Tests" in either the parent enum or the child struct, never both.
  • Doc comments on every public declaration.
  • Keep files under 225 lines (SwiftLint file_length); prefer Type+Modifiers.swift splits.
  • Run swift test and swift run fcpxml-diff schema-completeness Tests/FCPKitTests/TestData before each PR. Prefer opening a PR over merging.

Full spec with context and rationale: docs/planning/demo-presentation-video.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agentv0.1.0FCPKit v0.1.0 milestone work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions