Skip to content
rsdoielPublic

About

An experimental go package for working with Final Draft fdx files.

Topics

Resources

Stars

29 stars

Watchers

6 watching

Forks

Latest commit

 

History

142 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

fdx

fdx is a Go package and two small command line programs for working with the XML files that Final Draft writes (.fdx), and that other screenwriting programs such as Trelby, Celtx and Fade In read and write. The package parses an FDX document, writes it back as XML, renders it as Fountain-like plain text, and builds one from a Fountain document parsed by the fountain package. Its types carry JSON and YAML tags.

The package

doc, err := fdx.ParseFile("screenplay.fdx")
fmt.Println(doc.String())              // Fountain-like plain text

screenplay, _ := fountain.ParseFile("screenplay.fountain")
out := fdx.NewFinalDraft()
out.FromFountain(screenplay)
xml, _ := out.ToXML()                  // an FDX document
  • Scene numbers. A Fountain heading that ends in a number between hashes, INT. KITCHEN - DAY #12A#, becomes a Scene Heading whose Number attribute is "12A", and the heading text no longer holds the marker. Going the other way, a Number on a Scene Heading is written back as #12A#.
  • Boneyards. A Fountain boneyard (/* ... */) becomes an ordinary paragraph, so it shows and prints in Final Draft.

The programs

fdx2txt : reads an FDX file and writes plain text in a Fountain-like format.

txt2fdx : reads a Fountain file and writes an FDX file.

Install

Get a release from GitHub, or see INSTALL.md, which also covers installing from source. To use the package in a Go program:

go get github.com/rsdoiel/fdx

Build and test

You need Go 1.26.4 or later. Pandoc and GNU Make are only needed for the man pages and the website, and cmt (CMTools) only to regenerate version.go, about.md and CITATION.cff from codemeta.json.

make          # build the programs into bin/ and the man pages into man/
make test     # go test ./...
make check    # gofmt -l and go vet; rewrites nothing

About

An experimental go package for working with Final Draft fdx files.

Topics

Resources

Stars

29 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages