Extension:Fountain

From MediaWiki.org
Jump to: navigation, search


MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Fountain

Release status:Extension status stable

ImplementationTemplate:Extension#type Parser extension, Tag
DescriptionTemplate:Extension#description Parses screenplay text written in Fountain format inside of <fountain></fountain> tags and styles it
Author(s)Template:Extension#username Robert Koppsieker (memento_joetalk)
Latest versionTemplate:Extension#version 1.0.2 (2015-12-08)
MediaWikiTemplate:Extension#mediawiki 1.20+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license MIT License
Download Bitbucket
TagsTemplate:Extension#tags
<fountain></fountain>
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit
BeforePageDisplayManual:Hooks/BeforePageDisplay

Translate the Fountain extension if it is available at translatewiki.net

Check usage and version matrix.

The Fountain extension parses screenplay text written in Fountain format inside of <fountain></fountain> tags and styles it to look like a correctly formatted Screenplay. The Page source code from inside the tags can be copied to any editor ready for Fountain and be converted to PDF.

Installation[edit]

To activate this extension, add the following into your MediaWiki's composer.json

"require": {
  "php"                           : ">=5.3.2",
  "memento_joe/mediawiki-fountain": "1.*@dev",
  "xrstf/fountain"                : "1.*@dev"
}

do a composer install after updating composer

cd [/path/of/your/wiki]
php [path of composer.phar]/composer.phar self-update
php [path of composer.phar]/composer.phar install

and add at the bottom of your LocalSettings.php file:

require_once($IP.'/vendor/autoload.php');
require_once($IP.'/vendor/memento_joe/mediawiki-fountain/Fountain.php');

Usage[edit]

To convert a part of your MediaWiki article, you simple have to enclose the selected text with <fountain></fountain> tags. The complete Syntax can be found on Fountain.io. Also a cool usable live demo.

<fountain>

Title: A Simple Script
Author: Nima Yousefi
Draft date: 2/1/2012


FADE IN:

INT. OFFICE - MORNING

A MAN sits alone at his desk.

MAN (V.O.)
(passionately)
I'm writing.

FADE OUT.
> The End <

</fountain>

after saving or previewing changes results in:

styled output of Fountain