XML::Grammar::Screenplay - CPAN distribution implementing an XML grammar for screenplays.
version 0.14.11
See XML::Grammar::Screenplay::FromProto, XML::Grammar::Screenplay::ToDocBook and XML::Grammar::Screenplay::ToHTML.
XML::Grammar::Screenplay is a Perl module for:
The best way to use it non-programatically is using XML::Grammar::Screenplay::App::FromProto, XML::Grammar::Screenplay::App::ToDocBook and XML::Grammar::Screenplay::App::ToHTML, which are modules implementing command line applications for their processing.
The rest of this page will document the syntax of the custom textual format.
Version 0.14.11
Scenes are placed in XML-like tags of <section> ... </section> or abbreviated as <s> ... </s>. Opening tags in the format may have attributes whose keys are plaintext and whose values are surrounded by double quotes. (Single-quotes are not supported).
<section> ... </section>
<s> ... </s>
The scene tag must have an id attribute (for anchors, etc.) and could have an optional title attribute. If the title is not specified, it will default to the ID.
id
title
Scenes may be nested. There cannot be any sayings or descriptions (see below) except inside scenes.
Text is any of:
Regular text
Supported tags are <b> for bold text, <i> for italics, <a href="..."> for hyperlinks, and an empty <br /> tag for line-breaks.
<b>
<i>
<a href="...">
<br />
The text format supports SGML-like entities such as &, <, " and all other entities that are supported by HTML::Entities.
&
<
"
Text between square brackets ([ ... ]) is reserved for descriptions or inline descriptions (see below).
[ ... ]
The first paragraph when a character talks starts with the name of the character followed by a colon (:) and the rest of the text. Like this:
:
David: Goliath, I'm going to kill you! You'll see - I will.
If a character says more than one paragraph, the next paragraph should start with any number of "+"-signs followed by a colon:
David: Goliath, I'm going to kill you! You'll see - I will. ++++: I will sling you and bing you till infinity!
Descriptions that are not part of saying start with a [ at the first character of a line and extend till the next ]. They can span several paragraphs.
[
]
There are also internal descriptions to the saying which are placed inside the paragraph of the saying and describe what happens while the character talks.
<s id="top"> <s id="david_and_goliath"> [David and <a href="http://en.wikipedia.org/wiki/Goliath">Goliath</a> are standing by each other.] David: I will kill you. Goliath: no way, you little idiot! David: yes way! ++++: In the name of <a href="http://real-allah.tld/">Allah, the <b>merciful</b>, real merciful</a>, I will show you the [sarcastically] power of my sling. ++: I shall sling you and bing you till infinity. [David takes his sling.] Goliath: I'm still <a href="http://wait.tld/">waiting</a>. David: so you are. [David puts a stone in his sling and shoots Goliath. He hits.] David: as is written in the wikipedia [See <a href="http://wiki.tld/">the Wiki site</a> for more information], you are now dead, having been shot with my sling. </s> </s>
Other examples can be found in the t/data directory, and here:
t/data
The One with the Fountainhead
http://www.shlomifish.org/humour/TOWTF/
Humanity - The Movie
http://www.shlomifish.org/humour/humanity/
Star Trek - “We The Living Dead”
http://www.shlomifish.org/humour/Star-Trek/We-the-Living-Dead/
Selina Mandrake - The Slayer
http://www.shlomifish.org/humour/Selina-Mandrake/
Summerschool at the NSA
http://www.shlomifish.org/humour/Summerschool-at-the-NSA/
Shlomi Fish <shlomif@cpan.org>
This software is Copyright (c) 2007 by Shlomi Fish.
This is free software, licensed under:
The MIT (X11) License
Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Grammar-Fiction or by email to bug-xml-grammar-fiction@rt.cpan.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
You can find documentation for this module with the perldoc command.
perldoc XML::Grammar::Fiction
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
http://metacpan.org/release/XML-Grammar-Fiction
Search CPAN
The default CPAN search engine, useful to view POD in HTML format.
http://search.cpan.org/dist/XML-Grammar-Fiction
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Grammar-Fiction
AnnoCPAN
The AnnoCPAN is a website that allows community annotations of Perl module documentation.
http://annocpan.org/dist/XML-Grammar-Fiction
CPAN Ratings
The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
http://cpanratings.perl.org/d/XML-Grammar-Fiction
CPAN Forum
The CPAN Forum is a web forum for discussing Perl modules.
http://cpanforum.com/dist/XML-Grammar-Fiction
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.perl.org/dist/overview/XML-Grammar-Fiction
CPAN Testers
The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/X/XML-Grammar-Fiction
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=XML-Grammar-Fiction
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=XML::Grammar::Fiction
Please report any bugs or feature requests by email to bug-xml-grammar-fiction at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Grammar-Fiction. You will be automatically notified of any progress on the request by the system.
bug-xml-grammar-fiction at rt.cpan.org
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)
http://bitbucket.org/shlomif/perl-XML-Grammar-Fiction
hg clone ssh://hg@bitbucket.org/shlomif/perl-XML-Grammar-Fiction
To install XML::Grammar::Fiction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Grammar::Fiction
CPAN shell
perl -MCPAN -e shell install XML::Grammar::Fiction
For more information on module installation, please visit the detailed CPAN module installation guide.