Textplay is a simple command-line script that converts screenplays written in Fountain formatted plain-text to a variety of useful formats: HTML, FDX (Final Draft), or PDF (PrinceXML required).
Textplay has been rigorously tested against fountain documents, but it is not perfect, if you encounter a problem please open a github issue.
- I recommend cloning this repository somewhere convenient, then creating a symbolic link to
textplay
in/usr/local/bin/
gem install textplay
(gem may not always be up-to-date)
Textplay was built using Mac OS 10.6-9 and Ruby 1.8-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.
Calling Textplay from the command-line is simple:
textplay [options] [input-path] [output-path]
- The first argument is always an input-path.
- The second argument is always an output-path.
- If there's no output-path textplay prints to
STDOUT
(PDFs go to/tmp/
). - If there's no input-path textplay reads from
STDIN
.
Textplay has a number of options you can call in the command line:
-h
,--help
Displays the help text, including configuration options.-s
,--snippet
Create snippet instead of full document with headers/footers-f
,--fdx
Converts the file to FDX instead of HTML.-p
,--pdf
Converts the file to PDF (PrinceXML must be installed on your system).-x
,--xml
Output as the internal raw XML
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.
- Textplay is smart about what constitutes a transition. Usually, there's no need to escape transitions, but you can.
- An action line that contains no lower-case letters is converted to a slugline.
- In some cases Textplay does not assume that every whitespace character you type (newlines, spaces, and tabs) is intentional. For example, if you type one space on the line immediately below an all-caps line, Fountain assumes you'd like a Character saying “ ”. Textplay assumes you accidentally typed a space.
- Textplay only allows a single blank line between elements.
- Title Pages.
- Scene Numbers.
- Empty lines in dialogue-blocks.