Skip to content

Releases: mcqx4/screenplay-parser

v0.1.0 — initial release

26 May 15:41

Choose a tag to compare

What's in this release

First public release of screenplay-parser — a zero-dependency Python library for parsing Final Draft (.fdx) and Fountain screenplay files into structured JSON.

Features

  • Parses Final Draft .fdx XML format
  • Parses Fountain plain-text format
  • Auto-detects format from content
  • Outputs Scene and Script dataclasses serializable to JSON
  • CLI with three output modes: --output json, --output shotlist, --output stats
  • Zero runtime dependencies (Python stdlib only)
  • MIT licensed

Installation

pip install screenplay-parser

Or from source:

git clone https://github.com/mcqx4/screenplay-parser
cd screenplay-parser
pip install -e .

Usage

from screenplay_parser import parse

with open("script.fdx") as f:
    script = parse(f.read())

for scene in script.scenes:
    print(scene.heading, "—", scene.location_type, "—", scene.dialogue_count, "exchanges")

CLI:

screenplay-parser script.fdx --output json --pretty
screenplay-parser script.fdx --output shotlist > shots.md

Why this exists

Every AI pre-production tool that touches screenplays needs this parsing layer. Existing libraries are either tied to specific frameworks or abandoned. We open-sourced our internal parser (used at STORYLINER) so other builders don't waste a week on it.

Roadmap

  • Celtx CSV export support
  • PDF→Fountain heuristic parser
  • Better main-character detection (currently counts dialogue cues; needs to weight by speech length)
  • Configurable shot-estimate algorithm
  • Type hints (currently using dataclasses + Optional)

Maintained by

STORYLINER team — AI storyboard generator for film and ad pre-production. If you need full script-to-storyboard automation with character consistency, try Storyliner directly. If you just need to parse screenplays for your own pipeline, this library handles that layer.

Contributing

PRs welcome. See CONTRIBUTING-style notes in README.