Jump to content

Extension:Screenplay

From mediawiki.org
MediaWiki extensions manual
Screenplay
Release status: beta
Implementation Tag
Description Adds a <screenplay/> tag for screenplay formatting
Author(s) Matma Rex (talk Âˇ contribs), Isarra (talk Âˇ contribs)
Latest version 0.6
MediaWiki >= 1.39.0
License MIT License
Download
Example http://wiki.zaori.org/wiki/Holes/Session_48
  • $wgScreenplayTokens
Quarterly downloads 3 (Ranked 126th)
Translate the Screenplay extension if it is available at translatewiki.net
Issues Open tasks ¡ Report a bug

The Screenplay extension adds a parser for formatting wikitext within <screenplay/> tags into screenplay layout.

Installation

[edit]
  • Download and move the extracted Screenplay folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Screenplay
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Screenplay' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

[edit]

Mostly fountain-like syntax, mostly due to coincidence. Parsing is done based on line layout and position.

All items are separated by a double linebreak.

  • Scene headings: Single lines, begin with INT or EXT. Automatically format to display full line as all caps.
  • Dialogue block: Has at least two lines - an all-caps speaker, followed by some dialogue text. Single linebreaks may be used between component parts, or within the dialogue itself.
    • Speaker: All caps. Start of block.
    • Parenthetical: Wrapped in parentheses, can appear anywhere after the speaker. Must have its own line.
    • Dialogue: Anything else after the speaker.
  • Slugs: Anything else (probably). Just display as full-width regular lines (within the context of the overall screenplay formatting).

Example

[edit]
<screenplay>
INT. Some place - night

Some flavour text to set the scene and all that jazz. Yeah.

SOME GUY
I'm talking, what.

HORSE
(doing stuff)
Yeah, yeah, apparently I'm a talking horse doing stuff too. That's great, man. Just bloody great. Sod off.

One of them does something else or stuff. Or both. Maybe the scene even does something.

HORSE
Yeah, it's real fascinating.
</screenplay>

Limitations

[edit]
  • Ideally the scene headers would be added to the table of contents, but mw core's handling of the table of contents sucks, so doing this would basically involve reimplementing the entire thing, or something. So we haven't bothered.
    • For similar reasons, normal MediaWiki headers within the <screenplay> tags are also not added to the table of contents, though they do format normally.
  • Some stuff that should exist is just plain missing. File a bug!