overvale / Textplay

Textplay is a simple command-line script that converts screenplays written in Fountain formatted plain-text to HTML, XML, and FDX (Final Draft).
Other
104 stars 17 forks source link

Textplay

Textplay is a simple command-line script that converts screenplays written in Fountain formatted plain-text to HTML, XML, and FDX (Final Draft).

Textplay has been rigorously tested against fountain documents, but it is not perfect, if you encounter a problem please open a github issue_.

Installation

This will place a symbolic link to textplay in /usr/local/bin/. This symbolic link can be removed with make uninstall.

Textplay was built using Mac OS 10.10 and Ruby 2.0. I have only tested it in this environment, if you want to run Textplay in another environment (such as Windows) you may have to modify the code.

Using textplay

::

textplay [options]

-h, --help        Display the help text
-s, --snippet     Do not include document headers/footers
-f, --fdx         Convert to Final Draft .fdx
-x, --xml         Output as the internal raw XML
-d, --diff        Assume input is a diff, generate revision marks
-w, --wrap        Wrap action and dialogue paragraphs

Texplay is designed to be a Unix tool, thus it always reads from STDIN and writes to STDOUT. To make a file use standard Unix redirection. For example::

textplay < screenplay.fountain > screenplay.html

As another example, textplay has been tested extensively with PrinceXML_. To make a PDF from a fountain document, use this::

textplay < screenplay.fountain | prince - -o screenplay.pdf

Configuring textplay

Want to customize how textplay interprets your screenplay? Want to change the layout of your screenplay?

Using Fountain's key:value title-page syntax, you can control how textplay interprets your screenplay. See --help for info.

======================================= ================== Key Default Value ======================================= ================== title "A Screenplay" goldman_sluglines on screenbundle_comments off font "Courier Prime" slugline_spacing (number of 12pt lines) 1 bold_sluglines on underlined_sluglines off wrap_paragraphs off header (empty by default) footer (empty by default) ======================================= ==================

Revision Marks

It is possible to create a screenplay with revision marks via Textplay. You'll have to know how to use diff and pass the output to Textplay. See --help for instructions.

Support for the Fountain Format

.. Fountain: http://fountain.io .. Final Draft: http://finaldraft.com .. github issue: https://github.com/olivertaylor/Textplay/issues?state=open .. PrinceXML: http://princexml.com