Text::Format::Screenplay - Create a movie screenplay PDF from text.
use Text::Format::Screenplay; my $formatter = Text::Format::Screenplay->new(); $formatter->pdf("./myscreenplay.sp", "./myscreenplay.pdf");
This module takes a text file and turns it into a printable movie screenplay PDF. The text file contains minimal syntax to identify the parts of the screenplay.
This function creates a new instance of Text::Format::Screenplay and returns it.
This method formats the file given and creates a PDF file. The generated file can then be read on screen or printed, for example.
Currently the formatter applies all industry standards on how a movie screenplay should be formatted.
This module expects as input a file in a custom text-based format. This section explaines this format, which is kept very simple and minimal so to not interfer with the writing process - after all the screenplay format is very simple itself.
The format introduced is called "SP" (ScreenPlay) and the file ending is usually ".sp", but this is not a restriction.
The format is paragraph based, so when read the file is split into paragraphs, each having a specific meaning, determined by the first characters of that paragraph (e.g. ":"). In some cases there can be a label before the first character (like in dialoge, s.below).
Here is a complete example of a valid .sp file:
title: Pulp Fiction author: Quentin Tarantino contact: Writers Guild; Westend Drive 1234; 5342 Los Angeles, CA; United States of America draft: Final Draft date: May 1993 :INT. COFFEE SHOP - MORNING A normal Denny's, Spires-like coffee shop in Los Angeles. It's about 9:00 in the morning. While the place isn't jammed, there's a healthy number of people drinking coffee, munching on bacon and eating eggs. It is impossible to tell where the Young Woman is from old she is; everything she does contradicts something she did. The boy and girl sit in a booth. Their dialogue is to be said in a rapid-pace "HIS GIRL FRIDAY" fashion. YOUNG MAN: No, forget it, it's too risky. I'm through doin' that shit. YOUNG WOMAN: You always say that, the same thing every time: never again, I'm through, too dangerous. (imitates a duck) Quack, quack, quack, quack, quack, quack, quack... The boy and girl laugh, their laughter putting a pause in there, back and forth. >CUT OUT :CUT TO CREDIT SEQUENCE :INT. '74 CHEVY (MOVING) - MORNING An old gas guzzling, dirty, white 1974 Chevy Nova a homeless-ridden street in Hollywood. In the front seat are two young fellas -- one white, one black -- both wearing cheap black suits with thin black ties under long green dusters. Their names are VINCENT VEGA (white) and JULES WINNFIELD ~THE END
The titlepage parts follow the normal paragraph format partname:partcontent. The example above shows all available titlepage parts: title, author, contact, draft and date. As you can see, titlepage parts can span several lines (see contact in the example above).
A scene starts with a headline, which is a single line preceeded by a colon (":"), e.g.:
:INT. '74 CHEVY (MOVING) - MORNING
When a character's dialogue is to be written, just write the character's name, then a colon (":") and then the spoken text, which can span multiple lines.
Transitions are optional markings at the start or end of a scene (like "CUT TO"). These are preceeded by a "<" or ">" depending on the alignment that should be used for the transition:
>CUT OUT :CUT TO
Any paragraphs not beeing a titlepage part, a scene headline, a dialoge text or a transition is considered a scene description.
None by default.
The future of this module depends on its users. If you have any suggestions or find bugs, let me know, so I can improve this module and fix those bugs. Also, anyone who finds errors in the way the screenplay is formatted: please, let me know.
Tom Kirchner, <firstname.lastname@example.org>
Copyright (C) 2011 by Tom Kirchner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.