« blib/lib/XML/Grammar/Fiction/FromProto/Parser.pm
↑ Summary
blib/lib/XML/Grammar/Screenplay/FromProto/API/ListImages.pm »
| 1 | package XML::Grammar::Screenplay; | ||
| 2 | 1 | $XML::Grammar::Screenplay::VERSION = '0.22.4'; | |
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | |||
| 7 | 1 | 1; | |
| 8 | |||
| 9 | __END__ | ||
| 10 | |||
| 11 | =pod | ||
| 12 | |||
| 13 | =encoding UTF-8 | ||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | XML::Grammar::Screenplay - CPAN distribution implementing an XML grammar for | ||
| 18 | screenplays. | ||
| 19 | |||
| 20 | =head1 VERSION | ||
| 21 | |||
| 22 | version 0.22.4 | ||
| 23 | |||
| 24 | =head1 SYNOPSIS | ||
| 25 | |||
| 26 | See L<XML::Grammar::Screenplay::FromProto>, | ||
| 27 | L<XML::Grammar::Screenplay::ToDocBook> and | ||
| 28 | L<XML::Grammar::Screenplay::ToHTML>. | ||
| 29 | |||
| 30 | =head1 DESCRIPTION | ||
| 31 | |||
| 32 | XML::Grammar::Screenplay is a Perl module for: | ||
| 33 | |||
| 34 | =over 4 | ||
| 35 | |||
| 36 | =item 1. Converting a well-formed plain text format to a specialized XML format. | ||
| 37 | |||
| 38 | =item 2. Converting the XML to DocBook/XML or directly to HTML for rendering. | ||
| 39 | |||
| 40 | =back | ||
| 41 | |||
| 42 | The best way to use it non-programatically is using | ||
| 43 | L<XML::Grammar::Screenplay::App::FromProto>, | ||
| 44 | L<XML::Grammar::Screenplay::App::ToDocBook> and | ||
| 45 | L<XML::Grammar::Screenplay::App::ToHTML>, which are modules implementing | ||
| 46 | command line applications for their processing. | ||
| 47 | |||
| 48 | The rest of this page will document the syntax of the custom textual format. | ||
| 49 | |||
| 50 | =head1 FORMAT | ||
| 51 | |||
| 52 | =head2 Scenes | ||
| 53 | |||
| 54 | Scenes are placed in XML-like tags of C<< <section> ... </section> >> or | ||
| 55 | abbreviated as C<< <s> ... </s> >>. Opening tags in the format may have | ||
| 56 | attributes whose keys are plaintext and whose values are surrounded by | ||
| 57 | double quotes. (Single-quotes are not supported). | ||
| 58 | |||
| 59 | The scene tag must have an C<id> attribute (for anchors, etc.) and could | ||
| 60 | have an optional C<title> attribute. If the title is not specified, it will | ||
| 61 | default to the ID. | ||
| 62 | |||
| 63 | Scenes may be B<nested>. There cannot be any sayings or descriptions (see below) | ||
| 64 | except inside scenes. | ||
| 65 | |||
| 66 | =head2 Text | ||
| 67 | |||
| 68 | Text is any of: | ||
| 69 | |||
| 70 | =over 4 | ||
| 71 | |||
| 72 | =item 1. Plaintext | ||
| 73 | |||
| 74 | Regular text | ||
| 75 | |||
| 76 | =item 2. XML-like tags. | ||
| 77 | |||
| 78 | Supported tags are C<< <b> >> for bold text, C<< <i> >> for italics, | ||
| 79 | C<< <a href="..."> >> for hyperlinks, and an empty C<< <br /> >> tag for line-breaks. | ||
| 80 | |||
| 81 | =item 3. Entities | ||
| 82 | |||
| 83 | The text format supports SGML-like entities such as C<< & >>, | ||
| 84 | C<< < >>, C<< " >> and all other entities that are supported by | ||
| 85 | L<HTML::Entities>. | ||
| 86 | |||
| 87 | =item 4. Text between [ ... ] | ||
| 88 | |||
| 89 | Text between square brackets (C<[ ... ]>) is reserved for descriptions | ||
| 90 | or inline descriptions (see below). | ||
| 91 | |||
| 92 | =back | ||
| 93 | |||
| 94 | =head2 Sayings | ||
| 95 | |||
| 96 | The first paragraph when a character talks starts with the name of the | ||
| 97 | character followed by a colon (C<:>) and the rest of the text. Like this: | ||
| 98 | |||
| 99 | David: Goliath, I'm going to kill you! You'll see - | ||
| 100 | I will. | ||
| 101 | |||
| 102 | If a character says more than one paragraph, the next paragraph should start | ||
| 103 | with any number of "+"-signs followed by a colon: | ||
| 104 | |||
| 105 | David: Goliath, I'm going to kill you! You'll see - | ||
| 106 | I will. | ||
| 107 | |||
| 108 | ++++: I will sling you and bing you till infinity! | ||
| 109 | |||
| 110 | =head2 Descriptions. | ||
| 111 | |||
| 112 | Descriptions that are not part of saying start with a C<[> at the first | ||
| 113 | character of a line and extend till the next C<]>. They can span several | ||
| 114 | paragraphs. | ||
| 115 | |||
| 116 | There are also internal descriptions to the saying which are placed | ||
| 117 | inside the paragraph of the saying and describe what happens while the | ||
| 118 | character talks. | ||
| 119 | |||
| 120 | =head2 EXAMPLES | ||
| 121 | |||
| 122 | =head3 Comprehensive Example | ||
| 123 | |||
| 124 | <s id="top"> | ||
| 125 | |||
| 126 | <s id="david_and_goliath"> | ||
| 127 | |||
| 128 | [David and <a href="http://en.wikipedia.org/wiki/Goliath">Goliath</a> are | ||
| 129 | standing by each other.] | ||
| 130 | |||
| 131 | David: I will kill you. | ||
| 132 | |||
| 133 | Goliath: no way, you little idiot! | ||
| 134 | |||
| 135 | David: yes way! | ||
| 136 | |||
| 137 | ++++: In the name of <a href="http://real-allah.tld/">Allah, the | ||
| 138 | <b>merciful</b>, real merciful</a>, I will show you | ||
| 139 | the [sarcastically] power of my sling. | ||
| 140 | |||
| 141 | ++: I shall sling you and bing you till infinity. | ||
| 142 | |||
| 143 | [David takes his sling.] | ||
| 144 | |||
| 145 | Goliath: I'm still <a href="http://wait.tld/">waiting</a>. | ||
| 146 | |||
| 147 | David: so you are. | ||
| 148 | |||
| 149 | [David puts a stone in his sling and shoots Goliath. He hits.] | ||
| 150 | |||
| 151 | David: as is written in the wikipedia [See <a href="http://wiki.tld/">the | ||
| 152 | Wiki site</a> for more information], you are now dead, having been shot with | ||
| 153 | my sling. | ||
| 154 | |||
| 155 | </s> | ||
| 156 | |||
| 157 | </s> | ||
| 158 | |||
| 159 | =head3 More Examples | ||
| 160 | |||
| 161 | Other examples can be found in the C<t/data> directory, and here: | ||
| 162 | |||
| 163 | =over 4 | ||
| 164 | |||
| 165 | =item * The One with the Fountainhead | ||
| 166 | |||
| 167 | L<http://www.shlomifish.org/humour/TOWTF/> | ||
| 168 | |||
| 169 | =item * Humanity - The Movie | ||
| 170 | |||
| 171 | L<http://www.shlomifish.org/humour/humanity/> | ||
| 172 | |||
| 173 | =item * Star Trek - “We The Living Dead” | ||
| 174 | |||
| 175 | L<http://www.shlomifish.org/humour/Star-Trek/We-the-Living-Dead/> | ||
| 176 | |||
| 177 | =item * Selina Mandrake - The Slayer | ||
| 178 | |||
| 179 | L<http://www.shlomifish.org/humour/Selina-Mandrake/> | ||
| 180 | |||
| 181 | =item * Summerschool at the NSA | ||
| 182 | |||
| 183 | L<http://www.shlomifish.org/humour/Summerschool-at-the-NSA/> | ||
| 184 | |||
| 185 | =back | ||
| 186 | |||
| 187 | =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan | ||
| 188 | |||
| 189 | =head1 SUPPORT | ||
| 190 | |||
| 191 | =head2 Websites | ||
| 192 | |||
| 193 | The following websites have more information about this module, and may be of help to you. As always, | ||
| 194 | in addition to those websites please use your favorite search engine to discover more resources. | ||
| 195 | |||
| 196 | =over 4 | ||
| 197 | |||
| 198 | =item * | ||
| 199 | |||
| 200 | MetaCPAN | ||
| 201 | |||
| 202 | A modern, open-source CPAN search engine, useful to view POD in HTML format. | ||
| 203 | |||
| 204 | L<https://metacpan.org/release/XML-Grammar-Fiction> | ||
| 205 | |||
| 206 | =item * | ||
| 207 | |||
| 208 | RT: CPAN's Bug Tracker | ||
| 209 | |||
| 210 | The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. | ||
| 211 | |||
| 212 | L<https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Grammar-Fiction> | ||
| 213 | |||
| 214 | =item * | ||
| 215 | |||
| 216 | CPANTS | ||
| 217 | |||
| 218 | The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. | ||
| 219 | |||
| 220 | L<http://cpants.cpanauthors.org/dist/XML-Grammar-Fiction> | ||
| 221 | |||
| 222 | =item * | ||
| 223 | |||
| 224 | CPAN Testers | ||
| 225 | |||
| 226 | The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. | ||
| 227 | |||
| 228 | L<http://www.cpantesters.org/distro/X/XML-Grammar-Fiction> | ||
| 229 | |||
| 230 | =item * | ||
| 231 | |||
| 232 | CPAN Testers Matrix | ||
| 233 | |||
| 234 | The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. | ||
| 235 | |||
| 236 | L<http://matrix.cpantesters.org/?dist=XML-Grammar-Fiction> | ||
| 237 | |||
| 238 | =item * | ||
| 239 | |||
| 240 | CPAN Testers Dependencies | ||
| 241 | |||
| 242 | The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. | ||
| 243 | |||
| 244 | L<http://deps.cpantesters.org/?module=XML::Grammar::Fiction> | ||
| 245 | |||
| 246 | =back | ||
| 247 | |||
| 248 | =head2 Bugs / Feature Requests | ||
| 249 | |||
| 250 | Please report any bugs or feature requests by email to C<bug-xml-grammar-fiction at rt.cpan.org>, or through | ||
| 251 | the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=XML-Grammar-Fiction>. You will be automatically notified of any | ||
| 252 | progress on the request by the system. | ||
| 253 | |||
| 254 | =head2 Source Code | ||
| 255 | |||
| 256 | The code is open to the world, and available for you to hack on. Please feel free to browse it and play | ||
| 257 | with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull | ||
| 258 | from your repository :) | ||
| 259 | |||
| 260 | L<https://github.com/shlomif/fiction-xml> | ||
| 261 | |||
| 262 | git clone git://github.com/shlomif/fiction-xml.git | ||
| 263 | |||
| 264 | =head1 AUTHOR | ||
| 265 | |||
| 266 | Shlomi Fish <shlomif@cpan.org> | ||
| 267 | |||
| 268 | =head1 BUGS | ||
| 269 | |||
| 270 | Please report any bugs or feature requests on the bugtracker website | ||
| 271 | L<https://github.com/shlomif/fiction-xml/issues> | ||
| 272 | |||
| 273 | When submitting a bug or request, please include a test-file or a | ||
| 274 | patch to an existing test-file that illustrates the bug or desired | ||
| 275 | feature. | ||
| 276 | |||
| 277 | =head1 COPYRIGHT AND LICENSE | ||
| 278 | |||
| 279 | This software is Copyright (c) 2007 by Shlomi Fish. | ||
| 280 | |||
| 281 | This is free software, licensed under: | ||
| 282 | |||
| 283 | The MIT (X11) License | ||
| 284 | |||
| 285 | =cut | ||