scripter-0.1.0 is not a library.
scripter
A good looking LaTeX script/screenplay compiler
What does this do?
There's a nice screenplay LaTeX package but using it iss not particularly convenient, as the code gets quite verbose.
Instead let's use an ad-hoc minimal script language and transpile to TeX.
The rules of the language
- Whitespace at beginning and end of lines are ignored
- Lines with only whitespace in them are ignored
- The first line is the title
- The second line is the author(s)
- Lines beginning with
INT.
orEXT.
are treated as sluglines, what comes afterINT.
andEXT.
is free-form - Lines with
:
in them are split using this character and it's assumed that generates two parts. The first is the character that's speaking, the second is what's being said. - Other lines are treated as description
Example
Input:
The Alienant, version 1
Firstname Lastname
INT. SPACE STATION
Dark corridor. Something lurks in the shadows.
EXT. MILITARY BASE -- DAY
COLONEL SMITH smokes a cigarette. Looks up as CAPTAIN PARKER approaches.
SMITH: So, it's begun.
PARKER: Yes, it has.
SMITH: I was afraid it'd come to this.
TeX output:
\title
\author
\begin{document}
\coverpage
\fadein
\intslug
Dark corridor. Something lurks in the shadows.
\extslug
COLONEL SMITH smokes a cigarette. Looks up as CAPTAIN PARKER approaches.
\begin{dialogue} So, it's begun.\end{dialogue}
\begin{dialogue} Yes, it has.\end{dialogue}
\begin{dialogue} I was afraid it'd come to this.\end{dialogue}
\theend
\end{document}