|06-17-2019, 10:08 PM||#1|
Join Date: Apr 2009
Using Shell Scripts with Fountain
I'm wasting time with shell scripts. Actually, it saves a lot of time in the long run (if I was actually writing screenplays in Fountain format).
Here's a link to a video showing a short Fountain file being into six slightly different PDF files, using six shell scripts. (There is no sound in the videos and it will be evident that I don't do this very often.)
Now the explanation ...
Assuming you've written a short screenplay using your favorite editor in Fountain format and you want to produce a PDF from the Fountain file. And (for some inexplicable reason) you wanted to do this without a GUI program using the shell (or CLI) of your OS.
There are (at least) three CLI utilities that will let you do this. "Afterwriting, ScreenPlain and Wrap. Because I'm obsessed with Fountain, I've installed all three utilities on my Linux desktop and laptop and experimented with each of them.
Screenplain is written in Python and uses Courier New as its default font. At this point I don't know how to change the font, but it can be done (I think). It also comes with a "Strong" option which bolds and underlines the Scene Headings. I DO know how to change that — go into Screenplain's export folder and edit the pdf.py file (since the file is commented, it's pretty easy to find). You can also change the double space for headers to single space, by editing the same file ("slug_style" at "space_before" from "24" to "line_height"). Screenplain CLI will also convert Fountain files into Final Draft (.fdx) files or HMTL files.
'Afterwriting is written in Java and defaults to Courier Prime. It uses a "--config" option that, if you don't want to use A4 paper, is mandatory. The file's default name is "config.json" and the 'Afterwriting GIT site shows how to write it with copy and paste (actually write "them" as you can have multiple configuration files). The config file does everything (or just about everything) that the Settings on the online version will do. For me, the main changes I've made were, turn off printing Title page, using "usletter" instead of A4 and turning off bold Scene Headings and changing to single space for them. But I also have another configuration file for Bold Slugs (and could have many more). So far I haven't been able to get the "--fonts" flag to work. I want to try it with Courier Screenplay at some point.
Wrap is written in (I believe) Go. I don't know how to tweak it, so it defaults to two spaces before Scene Headings and no bolding (unless you put it into your Fountain files yourself). It also defaults to Courier Prime. I HAVE been able to use its font option to use Courier Screenplay, so (currently) I have two Wrap scripts, one for Courier Prime and one for Courier Screenplay. Wrap will also output to HTML (but not Final Draft).
Now why the Shell Scripts?
Because the lines to run these utilities can look like ...
Not only do the Shell Scripts save you from typing in all of the options each time, they also automatically move me to my scripts folder add in the right extensions when reading the file and they output to right file extension.
And so much for that.
The second video shows a "OneStep" method of changing a Fountain file into a formatted text file (for pasting to various forums). It should be self-explanatory ...
If any of you have made it this far ... thanks for reading (and watching).
Here's a "printout" of a couple of the shell scripts used here. These are pretty simple — which is a mandatory requirement if I'm writing them.
STANDARD DISCLAIMER: I'm a wannabe, take whatever I write with a huge grain of salt.