Thanks to the hard work of Nima Yousefi, Will Carlough and Andy Maloney, we have a Scrippets plugin that seems to be working pretty reliably. It’s installed at this site now, and we’ll be seeding it out to a few other screenwriting-oriented websites over the next few days to make sure it plays well with others.
Like most programming projects, getting to 90% was easy. Within hours after my original call to coders, there were three plugins that could get the job done.
That last 10% was tricky, however, because it meant looking for situations that would fail: different WordPress themes, competing plugins, and unexpected user input. For example, my original Ruby code couldn’t distinguish between an all-caps slugline and a character name, and the way I was doing it, it would have been very hard to add that capability.1
In terms of plugins, Markdown is the devil. Rarely have I loved and loathed something so thoroughly. Almost any time you’d see a scrippet break in the middle, it was because of Markdown.
While I think the plug-in is working well, I suspect there will be a few more iterations before we let it out into the wild. So test it out in the comments. As a reminder, the syntax is…
[scrippet]
EXT. HOUSE – DAY
Max is checking his mail when he spots neighbor FRANK crossing the street, heading his way.
Shaking his head…
MAX
I thought we talked about this, Frank.
FRANK
(drunk)
I was born naked and I’m not changing now.
[/scrippet]
which becomes…
EXT. HOUSE – DAY
Max is checking his mail when he spots neighbor FRANK crossing the street, heading his way.
Shaking his head...
MAX
I thought we talked about this, Frank.
FRANK
(drunk)
I was born naked and I’m not changing now.
- The final plugin by Nima Yousefi uses regular expressions. ↩