GitXplorerGitXplorer
j

scripter

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
da4e8e199cbd32246d4cd9f6c859bc09fc94a4f6

Abandon the project, link to Fountain

jjstasiak committed 5 years ago
Unverified
ad037b6a1efeb584d617eaeef0f7972777031466

Release version 0.4.1

jjstasiak committed 5 years ago
Unverified
feb4d8a60bf8176a683eae67898bbb4b05ec2c5f

Fix a panic when trying to split a line with multi-byte characters

jjstasiak committed 5 years ago
Unverified
4d77909adc6a544527c395f9b5ba64e23703f744

Restore test_script.pdf deleted by accident

jjstasiak committed 5 years ago
Unverified
16cdde93955480dbf0b0996aa49596984b8392cf

Update version to 0.4.0

jjstasiak committed 5 years ago
Unverified
33fb40112668aa5b20e58a9e85cde198b5b079ca

Escape LaTeX special characters

jjstasiak committed 5 years ago

README

The README file for this repository.

This is an abandoned project. Use Fountain instead.

scripter

Build Status Coverage Status

A screenplay compiler.

What does this do?

There's a nice screenplay LaTeX package but using it is 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)
  • Empty lines are ignored
  • Lines beginning with INT. or EXT. are treated as sluglines, what comes after INT. and EXT. is free-form
  • Lines beginning with whitespace are assumed to contain dialogue. That requires them to contain at least one : character. The part before the first colon is is the character that's speaking, the second is what's being said. Parts in parentheses are treated as parentheticals. Colon characters other than the first are treated as plain text.
  • 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. There are items on his desk: a bottle of whisky, a gun and a doll. SMITH looks up as CAPTAIN PARKER approaches.

CAPTAIN PARKER doesn't look too well.

	SMITH: So, it's begun.
	PARKER: Yes. (inhales) Yes, it has.
	SMITH: I was afraid it'd come to this. Look: how about we –
	PARKER: No.
	SMITH: But & % $ # _ { } ~ ^ \
	PARKER: Hold on, what?

TeX output:

\documentclass{screenplay}
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc}
\title{The Alienant, version 1}
\author{Firstname Lastname}
\begin{document}
\coverpage
\fadein
\intslug{SPACE STATION}

Dark corridor. Something lurks in the shadows.

\extslug{MILITARY BASE -- DAY}

COLONEL SMITH smokes a cigarette. There are items on his desk: a bottle of whisky, a gun and a doll. SMITH looks up as CAPTAIN PARKER approaches.

CAPTAIN PARKER doesn't look too well.

\begin{dialogue}{SMITH}So, it's begun.\end{dialogue}

\begin{dialogue}{PARKER}Yes. \paren{inhales} Yes, it has.\end{dialogue}

\begin{dialogue}{SMITH}I was afraid it'd come to this. Look: how about we –\end{dialogue}

\begin{dialogue}{PARKER}No.\end{dialogue}

\begin{dialogue}{SMITH}But \& \% \$ \# \_ \{ \} \textasciitilde{} \textasciicircum{} \textbackslash{}\end{dialogue}

\begin{dialogue}{PARKER}Hold on, what?\end{dialogue}

\fadeout
\theend
\end{document}

Output PDF