Expand description
This crate is an implementation of the Fountain screenplay markup
language specification, and acts as a tool for parsing and exporting the Fountain
language to different kinds of formatted documents, such as html and pdf.
The crate can be used both for the whole compilation process, but also as an intermediary step for parsing Fountain text into an abstract syntax tree (AST) that can then be used when constructing new exporters.
§Examples
use rustwell::{Exporter, ExporterExt, HtmlExporter};
use rustwell::parse;
let script = r#"
Title: Example Screenplay
INT. HOUSE – DAY
Someone is knocking on the door.
GUEST
(tired)
Hey, open up!
"#;
let parsed = parse(script);
let exporter = HtmlExporter { ..Default::default() };
exporter.export_to_stdout(&parsed).unwrap()Re-exports§
pub use screenplay::Screenplay;
Modules§
- rich_
string - This module implements a
RichString, meaning a rich string which can have multiple attributes for style, and can have these on different parts of the same string. - screenplay
- This module implements the Screenplay AST with all the components of a screenplay, to be easily exported to any format.
Structs§
- Html
Exporter - A
Screenplayexporter forHTML - Paper
Size - Dimensions of a paper in points (pts).
- PdfExporter
- A
Screenplayexporter forpdf
Constants§
Traits§
- Exporter
- A
Screenplayexporter. - Exporter
Ext - An extension trait for
Exporterproviding common functionality.
Functions§
- parse
- Parses a Fountain source string into a Screenplay structure.
- parse_
reader - Parses a Fountain source file into a Screenplay structure.