Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.
Writing screenplays with Linux and open source tools
Writing screenplays with Linux and open source tools
Get the newsletter
Back in May of this year, Jason van Gumster wrote 4 open source tools for writing your next screenplay. It includes some tools I'd never heard of before, some tools I was very familiar with, and it was missing some tools that I myself loved. I thought a companion article might be of interest to our fellow screenwriters out there, with a closer look at some of the screenplay tools that Jason mentioned and a spotlight on some of the tools that I've uncovered (or created) myself.
For years (and in fact, to this very day), young artists are told that if they're "serious" about their art, they'll use a very specific set of tools. Those tools are, conveniently, the products of specific vendors. And while a student discount may apply at first, eventually the full price kicks in. Before you know it, you're beholden to that application forever.
Amazingly, something as simple as typing the text of a screenplay is subject to the exact same marketing push: you're told to use a specific application or a specific cloud service if you want to be taken "seriously." But the truth is, once a screenplay is printed out on white and pink and yellow and blue pages, as long as it's formatted correctly it's just text that could have been typed into any application. And let's face it: If there's one thing Linux has in abundance, it's text editors.
Screenplay formatting matters. In fact, it's an industry rule of thumb that one page of screenplay equates to one minute of screen time, and films are shot in divisions of page eighths. If an eighth of a page contains too much, that gives an unfair expectation of what needs to get shot in one session. There's a delicate balance to be had, and that's why screenplay formatting has evolved into the funky, off-centered layout it retains to this day.
While you can, technically, type a screenplay and format it manually, screenwriters tend to prefer to have an application that manages margins and some basic capitalization automatically. If the application also has features to help manage names of places and people, then that's an added bonus.
If you're a traditionalist, though, you're welcome to set your tabs and develop styles for LibreOffice yourself. In a nutshell:
- Courier 12pt font
- 1.5" left and right margins
- 2.5" left and right margins for dialogue
Assuming you're looking for something less manual, there are three screenplay applications that make open source screenwriting a breeze.
The preferred font for screenplays is, very strictly speaking, Courier at 12 points. Courier was designed a long time ago at IBM, and there have been several incarnations of it. Most people's experience with Courier comes from the Courier font (usually Courier 10 Pitch) that comes bundled with their operating system, but that specific .ttf file is probably technically under copyright. An open source Courier typeface has been provided by Alan Dague-Greene for screenwriter John August and is called Courier Prime.
You should download it and use it, especially for your screenplays.
If you got trained on closed source screenwriting tools in film school or adopted a once-open source application that has since moved to a closed source cloud-based model, then you're probably looking for Trelby (whether you know you are or not).
Trelby runs on Linux and Windows and is written in Python with the wxPython framework. If you don't already have wxPython installed, you can get it from PyPi, the Python packaging service, or from your distribution's repository.
If you're running Ubuntu or similar distributions, you should be able to install Trelby from its downloadable
.deb package. Otherwise, download the generic tarball, unarchive it to
/opt, and use it from there. The exact steps (where
Y are the major and minor version numbers):
$ sudo wget -qO- \
| tar -C ./opt/ -xvz trelby-X.Y/trelby --strip 1
$ sudo mv /opt/trelby/trelby.desktop \
Launch as usual.
Trelby is, basically, a perfect application. It's got all the must-have features, a few of the nice-to-haves, none of the bloat, and it's written to be smart, to stay out of your way, and to treat your data with respect. It's like a typewriter with a brain—and without the attitude.
When you first launch Trelby, click the Settings icon in the left toolbar, or navigate to File > Settings > Change.
In the Settings window, click the Display category in the left column. If Trelby has not auto-detected your Courier font, then set all typefaces to Courier Prime at 12 points.
Remember the Courier Prime directive.
With your fonts sorted, the only thing left to do is write. Trelby takes care of the mundane formatting for you; a typical start to a screenplay (after the obligatory
FADE IN:) is a slug line. That's a fancy term for the setting (the in-world representation of the location). A slug line is written in all capital letters, and it always starts with either
EXT. for exterior or
INT. for interior. As long as you capitalize the first three letters, Trelby auto-detects that you're typing a slug line, or "scene heading," and retains the capital letters and bold typeface for the duration of the line.
After a slug is usually stage direction (or "action"); that is, non-dialogue text. Trelby assumes this to be the case, and drops into standard type after you hit Return.
When you need to override the action style setting, you can either force a new slug by typing
INT., or else add in some dialogue (films apparently have sound now, and by all accounts it's fontcatching on).
To enter dialogue mode, press Tab. This moves your cursor inward for the standard character name indentation and forces capital letters. On the next line, the indent is adjusted further so that you can type your dialogue block.
Talkies are a fad
Another Tab exits dialogue mode and returns you to normal entry. As usual, typing produces action and an appropriate prefix produces a slug.
An element for every occasion
The scene, action, and dialogue element types cover about 95% of your screenwriting needs, but there are other entry types that screenplays use, the greatest of which is the transition. The extra element types can be entered via a right-click, or via
ALT keyboard shortcuts, documented in Settings >; Change > Keyboard (look for ChangeTo actions, which switch to a specific mode at a blank line, and convert text if on a line already containing text).
To be fair, the transition is mostly decorative at this point;
CUT TO: is pretty much assumed (traditionally, it differentiated between a physical cut and a dissolve, which is an optical effect and cost more money), and you don't really mean
FADE IN and
FADE OUT necessarily, but they're the "Once upon a time..." and "...and they lived happily ever after" of screenplays.
Other element types are less common, and usually the less specific and less exact you are in a screenplay, the better. Screenplays are blueprints for a story, not for acting or editing, so less is usually considered to be more.
Like everything else in the screenplay world, there's a certain look and feel expected from a title page. Admittedly, in practice it does vary, but the basic title page is pretty iconic[ally simple].
Behold, the title page
To create your own title page, navigate to the Script menu > Title pages.
A funny thing about screenplays is that no matter how much you work on it, you'll never quite recall how you finally decided to spell that bit player's name, or that one location that you used way in the beginning just so you could bring it back in the end. Historically, you'd have had to flip back through the pages, frantically searching for an answer, as your muse slowly faded from your grasp.
No more! With modern applications like Trelby, your screenplay is granted a character name and location database. Typing either a location in a slug line or a character at the start of dialogue brings up an auto-complete function so you can choose from the correct entry as needed.
Can't think of a name in the first place? Trelby has that covered, too. Gone are the days of opening up a browser and navigating to ad-ridden "What to name your baby" sites. Trelby has a built-in name database classified by gender and ethnicity.
What's more is that you can even generate reports from Trelby, so you (or the pre-production office) can have a quick reference about what parts are needed in the film, how big the parts are (in terms of lines and percentage of dialogue), and locations.
As your screenplay gets longer and more complex, navigation can become daunting. Trelby helps you find your way around by providing navigation by scene number (
Alt-G) or page number (
Ctrl-G). You can also select entire blocks of text by scene, making re-working your script just a little bit easier.
In short, there are plenty of features in Trelby for even the most hard-boiled screenwriter, and best of all, there are no more features than such a screenwriter would want. No more silly features no one actually uses, no more proprietary save file formats, and no more licensing problems.
On the opposite end of the spectrum is the option to not use a screenplay editor at all, and in fact not even bother formatting what you write. Sound crazy? It may well be, but it's the good kind of crazy, and it's called Fountain.
- Slugs are capitalized (as usual)
- Character headings for dialogue are capitalized and terminated with a newline (as usual). No whitespace between the character name and the dialogue block. No whitespace between dialogue paragraphs, only newlines.
- Action blocks are separated by one blank line
- Transitions get placed in **double asterisks**
That's all there is to it. If you write with those rules in mind, then you have produced a Fountain markdown file.
It looks a little something like this:
INT. FACTORY - DAY
It's still daylight. Or is it? Through the
thick black smoke and the crowd of sweating
bodies, it's hard to tell.
Git on with it, we're not paying you to stand
around gaping at the ceiling.
The worker, STAN, looks one-and-two-thirds his
age. He wipes sweat from his brow, then looks
at his sleeve.
The stigmata. It's back.
As you can see, it looks and feels like a screenplay even though it lacks the proper formatting.
To produce a fancy industry-style title page, some markup is required. It's not complex, but it should appear at the top of your screenplay:
Title: The Stigmata of Stan
Credit: written by
Author: Seth Kenlon
Source: based on the novel by Seth Kenlon
Copyleft: CC-BY-SA Seth Kenlon
A story of the Great Depression, and how a guy named
Stan accidentally invents microprocessors and becomes
a messiah of a technological apocalypse..
INT. FACTORY - DAY
The advantage to Fountain is that you don't have to think at all about where your cursor is on the page as long as you can hit the Return key as you normally would in any text document. The disadvantage is that you have less sense of how much you've actually written. Text that spans a full screen text editor is a lot different when constrained between 5" margins. But with experience and frequent checks, you can develop a feel for page length.
Fountain in Trelby
What can you do with a Fountain file? You convert it to a screenplay using any one of many Fountain converters.
One converter, we've already covered: Yes, Trelby can import and format a
.fountain file. Just launch Trelby and select File > Import and choose the file. It helps if you use the extension
Barefoot in the Fountain
Another converter is the cross-platform shell command Barefoot. Written in C++, this command does need to be compiled (as far as I know, it's not in any Linux repository yet), but the compiling process is simple on Linux.
$ g++ -I /usr/include/boost/
barefoot.cpp -o barefoot
-L /usr/lib64/ -lboost_regex
Or on Fedora:
$ g++ -I /usr/include/boost/ \
barefoot.cpp -o barefoot \
-L /usr/lib/ -lboost_regex
The result of such a command is the
barefoot executable, which you can place in
$HOME/bin (if you have one) or
/usr/local/bin, and then run from a terminal.
Barefoot does one thing: it converts
.fountain screenplay files to formatted text. That means you can use it as a single command:
$ barefoot ~/my.fountain > movie.txt
Or you can use it in a larger pipeline:
$ barefoot myScreenplay.fountain \
| pr -f -t | text2pdf > \
And so on.
There are dozens of converters for Fountain, so whatever workflow you need, there's probably an application to suit.
A happy medium, perhaps, between the GUI application Trelby, and the non-application that is Fountain, is the Emacs screenwriter-mode.
The concept is very similar to Trelby: keyboard shortcuts allow you to write a few different elements. There are key bindings for all types; the new user and the Emacs veterans:
ctrl-c tto enter a transition
ctrl-c sto enter a slug line
ctrl-c afor action
ctrl-c dfor dialogue blocks
Generally, screenwriter-mode is about as automated as Trelby in terms of flow; it doesn't auto-detect a slug line, but since there's really no difference between action and a slug aside from capitalization, you can actually just type without ever switching to a "slug line element". Screenwriter-mode doesn't deal in metadata the way Trelby does; all
c-c s or
alt-s does is convert text to capitals.
More useful are the transition and character dialogue elements. These both involve complex indentation, so entering those entry modes is genuinely helpful. Like Trelby, new lines leave the modes and return to the default action entry.
Emacs being what it is, there are all kinds of convenience tools that you can tap into to manage location and character names. I use auto-complete but the choices are numerous.
The main advantage of screenwriter-mode is that it's cross-platform (anything that Emacs runs on, and that's practically everything) also runs screenwriter-mode. This means that you have a consistent screenwriting environment no matter what, and since Emacs also runs quite nicely in a terminal, you don't even need a GUI to write your masterpiece (how's that for distraction-free typing?).
Unix at the Movies
Screenwriter-mode, like Fountain, produces plain text files; there's no meta-data or special file format. Unlike Fountain, no conversion is required. Aside from ease of formatting, screenwriter-mode has no extra features like Trelby has, although for pre-production work, a plain text workflow is just as powerful.
Screenwriter-mode ships with several shell scripts for common screenplay-related tasks. The
screenplay-character script produces a report of all characters required by the script.
Screenplay-location prints a report of locations.
Screenplay-title produces a title page.
Unlike Trelby, there's no shortcut, exactly, to go to a specific scene number, or any menu option to select an entire scene. Writing a screenplay, however, in a modular fashion solves these problems; save each scene into a separate file so that you can move them around as needed, and then use the
screenplay-build to produce a single file with
screenplay-print to provide page numbers and to print with the
Script changes is something that is notoriously difficult to manage (mostly difficult for the humans, but sometimes for software, too), but a plain text workflow handles it with ease. Just as with source code, screenplays go through several revisions even while in production. Since page and scene numbers get frozen once a script goes into production, this presents an interesting puzzle; how can you add a page to your script without throwing off the pages already scheduled?
The answer is to print revised pages on their own page with a unique number (23, 23a, 23b, and so on), and often on color-coded paper (pink paper for first revisions, yellow for second, and so on). With plain text, such inserts are trivial thanks to
It seems silly to remind people that Linux can even edit text, but screenwriting is a niche industry with quirky requirements. People sometimes assume that open source doesn't have tools for the lesser markets (especially the creative ones), but luckily there are creative people who are invested in open source, too. Between Trelby, Fountain, and Emacs Screenwriter-mode, those among us with a story to tell and fingers itching to type have nothing to worry about.