0.1.2 • Published 6 years ago
trevi v0.1.2
Trevi
A Typescript based parser for the screenplay format Fountain. It is directly inspired by and (largly) copied from Fountain.js by mattdaly.
Installation
npm install trevi --save
# or
yarn add treviUsage
import Trevi from "trevi"
const trevi = new Trevi(fountainString)Blocks
Each section in the Fountain string is parsed into blocks assigned with a type (e.g. ACTION, CHARACTER, DIALOGUE, etc).
const blocks = trevi.blocksScenes
A scene consists of a slugline (scene heading) and the following blocks until the next slugline.
const scenes = trevi.scenes