Difference between revisions of "Extension:Screenplay"

A fragment of the Garden of Remembering

(...)
 
m
Line 1: Line 1:
=== Wikitext example ===
=== Wikitext example ===


<pre>
<pre><nowiki>
<screenplay>
<screenplay>
INT. SONM'S POST TAVERN - NIGHT
INT. SONM'S POST TAVERN - NIGHT
Line 19: Line 19:
Barkeep, a shalott for the lady. There's pain what needs forgetting, if only for a little while.
Barkeep, a shalott for the lady. There's pain what needs forgetting, if only for a little while.
</screenplay>
</screenplay>
</pre>
</nowiki></pre>


==== Rendered source ====
==== Rendered source ====
<pre>
<pre><nowiki>
<div class="screenplay">
<div class="screenplay">
<div class="sp-setting">INT. SONM'S POST TAVERN - NIGHT</div>
<div class="sp-setting">INT. SONM'S POST TAVERN - NIGHT</div>
Line 41: Line 41:
</div>
</div>
</div>
</div>
</pre>
</nowiki></pre>


== Parsing rundown ==
== Parsing rundown ==

Revision as of 03:53, 6 April 2014

Wikitext example

<screenplay>
INT. SONM'S POST TAVERN - NIGHT

It is late - the place is mostly empty. Vardaman is seated at the bar, with at least a barkeeep around somewhere as well. Coraline stumbles in, scratched, tired, and muddy, and winds up standing next to Vardaman.

VARDAMAN
You look worse than I feel.

CORALINE
I feel... well...

Instead of continuing, she sits.

VARDAMAN
(he sighs)
Barkeep, a shalott for the lady. There's pain what needs forgetting, if only for a little while.
</screenplay>

Rendered source

<div class="screenplay">
	<div class="sp-setting">INT. SONM'S POST TAVERN - NIGHT</div>
	<div class="sp-block">It is late - the place is mostly empty. Vardaman is seated at the bar, with at least a barkeeep around somewhere as well. Coraline stumbles in, scratched, tired, and muddy, and winds up standing next to Vardaman.</div>
	<div class="sp-line">
		<div class="sp-line-speaker">VARDAMAN</div>
		<div class="sp-line-text">You look worse than I feel.</div>
	</div>
	<div class="sp-line">
		<div class="sp-line-speaker">CORALINE</div>
		<div class="sp-line-text">I feel... well...</div>
	</div>
	<div class="sp-block">Instead of continuing, she sits.</div>
	<div class="sp-line">
		<div class="sp-line-speaker">VARDAMAN</div>
		<div class="sp-line-paren">(he sighs)</div>
		<div class="sp-line-text">Barkeep, a shalott for the lady. There's pain what needs forgetting, if only for a little while.</div>
	</div>
</div>

Parsing rundown

Things that would normally be wrapped in <p>s are wrapped in <div>s with classes as follows:

  • 'setting': first four letters are 'INT.' or 'EXT.'
  • 'line': begins all caps (until a single \n) that is not a setting; single linebreaks within these delimit further <div> wrappers as follows:
    • 'line-speaker': everything until the first single \n
    • 'line-paren': any line wrapped in parentheses that is not a speaker
    • 'line-text': any other line within a 'line'
  • 'block': anything else