Jun 16

New ExpressionEngine Plugin: Scrippet

Categories:
Tags:
, , , ,
Published:
11:27am on Tuesday 16th June, 2009

Here’s a little piece of formatting niceness that will be handy for anyone with an interest in film or scriptwriting. The Scrippet plugin converts your plain text screenplay extracts into nicely-formatted script blocks.

Based on an original idea by screenwriter John August, most of the work on Scrippets was done by Nima Yousefi for the original Wordpress plugin. I’ve simply taken that code and adapted it for use in ExpressionEngine.

Update 17/06: I have now also converted the Scrippet formatting into a new fieldtype for Brandon Kelly’s FieldFrame extension, so you can enter scripts directly into the Publish page. See this blog entry for full details.

Installation and Usage

To install the Scrippet plugin, grab the plugin and stylesheet from my GitHub repository. Copy the pi.scrippet.php file into your /plugins folder.

Unfortunately, ExpressionEngine doesn’t offer an easy way to dynamically load additional stylesheets, so for now you can either attach the scrippets.css stylesheet to your template, or copy-and-paste the CSS rules from that file into your existing site stylesheet.

To use the plugin, wrap your unformatted screenplay extract in {exp:scrippet}{/exp:scrippet} tags:

Formatted scene

{exp:scrippet}
INT. CARGO LOCK

The Queen spins at the sound of door motors behind her. The 
parting doors REVEAL an inhuman silhouette standing there.

Ripley steps out, WEARING TWO TONS OF HARDENED STEEL. THE 
POWER LOADER.  Like medieval armor with the power of a 
bulldozer. She takes a step…the massive foot CRASH-CLANGS 
to the deck.  She takes another, advancing.

Ripley’s expression is one you hope you’ll never see… Hell 
hath no fury like that of a mother protecting her child 
and that primal, murderous rage surges through her now, 
banishing all fear.

RIPLEY
Get away from her, you bitch!
{/exp:scrippet}

Parameters

There are a few optional parameters available to use with the {exp:scrippets} tag:

  • width - Sets the width (in pixels) of your scrippet block
  • bg_color - Sets the background colour of the block; you can use hex values, colour keywords, or RGBa values
  • text_color - Sets the text colour; possible values as per bg_color
  • alignment - Valid values are left or center; blocks with alignment=“center” will be centered on the page

The default appearance of the scrippet blocks is black text on a pale yellow background, 400 pixels wide.

Formatting options

Styles are applied to the text according to how it is formatted:

  • Scene headings start with either “INT”, “EXT” or “EST” and are all capitalised
  • Transitions end with a colon (e.g. “CUT TO:”) or can be a few hard-coded other options (e.g. “FADE TO BLACK”)
  • Characters will be in ALL CAPS followed by a single new-line
  • Parantheticals will be wrapped in parentheses, obviously
  • Dialogue comes straight after a character or paranthetical element
  • and Action is anything that doesn’t fall into any of the above categories

You can also include some additional formatting by using standard Textile markup for **bold text**, *italicised text* or _underlined text_.

Future developments

Another obvious use-case for this would be as a new field type for Brandon Kelly’s FieldFrame extension, and when I have a few spare minutes I’ll throw that together too.

What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.

I'd love to hear what you think - please use the form below to leave your comments. Some HTML is permitted: b, i, em, del, ins, strong, pre, code, blockquote, abbr. URLs or email addresses will be automatically converted into links.

Comment Form

  1. John August's Gravatar

    John August at 11:10pm on 16th June, 2009 #

    Thanks for doing this, Matthew.  I’ve updated the main scrippets.org site with a link to this page. Let me know if the URL changes, or if there are other updates that need to be shouted.

    Nice design, BTW.

  2. Jim's Gravatar

    Jim at 4:13pm on 17th June, 2009 #

    Wonderful!  I was hoping someone would do this.  I’ve been using John’s CSS code for styling any script excerpts on my site for some time now.

    Thanks!

  3. Matthew Pennell's Gravatar

    Matthew Pennell at 11:01am on 18th June, 2009 #

    Thanks for your comment, John - happy to contribute.

  4. Dekoracje Okien's Gravatar

    Dekoracje Okien at 10:12am on 19th June, 2009 #

    That seems pretty useful. Formatting stuff like this yourself always takes so much time… I love it!

  5. Mieszkania Gryfino's Gravatar

    Mieszkania Gryfino at 1:48pm on 18th August, 2009 #

    I see that this tool could be useful. But to successfully write a script or some kind of screenplay there is no need of installing some additional applications. Almost everyone has some kind of word (or other similar editor) and that’s it! It is very easy to write a script, short story or even novel using word. So what is so special about Scripped? Does this application offer anything unique?

  6. Matthew Pennell's Gravatar

    Matthew Pennell at 8:38pm on 19th August, 2009 #

    Mieszkania - the Scrippets plugin isn’t really designed to let you write a screenplay; it’s just a simple way to let bloggers correctly format script blocks in articles.

    I agree, something like Final Draft or Word is much more appropriate for actually writing your script.