Extension:Fountain

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
Fountain

Release status: stable

Implementation Parser extension, Tag
Description Parses screenplay text written in Fountain format inside of <fountain></fountain> tags and styles it
Author(s) Robert Koppsieker (memento_joetalk)
Latest version 1.0.1 (2013-07-06)
MediaWiki 1.20+
PHP 5.3+
Database changes No
License MIT
Download Bitbucket
Tags
<fountain></fountain>
Hooks used
ParserFirstCallInit

BeforePageDisplay

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

Check usage and version matrix; code metrics

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 | edit source]

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 | edit source]

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