Wednesday, November 11, 2015

How title page data works in Fountain Flow

Fountain syntax specifies that title page data is defined optionally at the top of the page, as key: value

For example...

Title: WHAM BAM BOOM!
Credit: Written by
Author: Rodney Faxwallow
Favorite beverage: coffee

Anything can be a key. Also, you don't have to stick to just one line. As the Fountain website shows, key: value can span lines.

Contact:
    The Faerie Workshop
    Little Tree Stump
    Grambling Meadows, MI

Fountain Flow turns all of this data into a list, and keeps track of line breaks within the data so that contact info up there, when it gets inserted, will appear just as intended.

But just because your data becomes part of a list doesn't mean it will automatically join the rest of the data on the title page. Your title page template will have to include a marker for the data you want, where you want it.


If you already have Fountain Flow installed, and pointed to the right folder, you can go to Vim and type the command :FlowDirectory to open up the templates. Open up the title page template, and you'll find lines like these.

    <p class="Title">%Title%</p>
    <p class="Author">%Credit% %Author%</p>
    <p class="Source">%Source%</p>

As you can see, the marker matches the actual key, bracketed by %%. The only thing that drops out are spaces. So a key like Draft date: requires the marker %Draftdate%.

In the sample above, the CSS class styles match, too, but that's not important. That's just meant for precise styling, and will have no impact on the data delivery.

If a marker is orphaned (no data) it will simply be scrubbed.

THOUGHT: This would stray outside Fountain syntax, but perhaps some extra marker could be included to specify the target region of the page for each item. This would simplify the title page template significantly, and eliminate the need to edit the template on a script-by-script basis.

So let's say you have a title page with three regions: region A is the top centered section, while B and C are two columns below, one flush left, and the other flush right.

Instead of just key: value, the source file could specify key: value [[region]], for example. Then Fountain Flow could add that data to the specified region, in the order listed. The title page template would only have to specify the names and positions of the regions.

It's a thought, anyway.

No comments:

Post a Comment