Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
fountain.ts
Advanced tools
A Typescript based parser for the screenplay format Fountain. Source originally from Matt Daly's fountain.js
Fountain-ts is a TypeScript based parser for the screenplay format Fountain. Based on Matt Daly's fountain-js.
The package known as fountain.ts
is being deprecated in favor of fountain-js
. Please visit the fountain-js NPM package for latest versions for this codebase.
Supports up to v 1.1
of the Fountain syntax.
Currently Fountain-ts supports a limited range of key-value pairs for title pages -
Fountain-ts behaves as Fountain-js does. Import Fountain
and create a new instance of it.
import { Fountain } from 'fountain.ts';
The output provided by Fountain-ts is an object literal, a Script
interface, of the format: { title: '...', html: { title_page: '...', script: '...' } }
.
An example.
import { Fountain, Script } from 'fountain.ts';
import * as assert from 'assert';
const text = `.OPENING TITLES
> BRICK & STEEL <
> FULL RETIRED <
SMASH CUT TO:`;
let fountain = new Fountain();
let output: Script = fountain.parse(text);
let actual = output.html.script;
const expected = '<h3>OPENING TITLES</h3><p class="centered">BRICK & STEEL <br /> FULL RETIRED</p><h2>SMASH CUT TO:</h2>';
assert.equal(actual, expected);
Like Fountain-js, if you want access to the tokens that Fountain-ts generates, simply attach a true
parameter to your parse calls. Requesting tokens adds a tokens property to the output generated by Fountain-ts.
let output: Script = fountain.parse(script, true);
console.log(output.tokens);
The tokens for the Brick & Steel sample found on the Fountain website would look as follows (just a small sample):
[
...,
{ type="scene_heading", text="EXT. BRICK'S PATIO - DAY", scene_number="1"},
{ type="action", text="A gorgeous day. The su...emplating -- something."},
{ type="action", text="The SCREEN DOOR slides ...es with two cold beers."},
{ type="dialogue_begin"},
{ type="character", text="STEEL"},
{ type="dialogue", text="Beer's ready!"},
{ type="dialogue_end"},
{ type="dialogue_begin"},
{ type="character", text="BRICK"},
{ type="dialogue", text="Are they cold?"},
{ type="dialogue_end"},
{ type="page_break"},
{ type="dialogue_begin"},
{ type="character", text="STEEL"},
{ type="dialogue", text="Does a bear crap in the woods?"},
{ type="dialogue_end"},
{ type="action", text="Steel sits. They laugh at the dumb joke."},
{ type="dialogue_begin"},
{ type="character", text="STEEL"},
{ type="parenthetical", text="(beer raised)"},
{ type="dialogue", text="To retirement."},
{ type="dialogue_end"},
{ type="dialogue_begin"},
{ type="character", text="BRICK"},
{ type="dialogue", text="To retirement."},
{ type="dialogue_end"}
...
]
Just like Fountain-js, Fountain-ts attaches some extra tokens, such as 'dialogue_begin'
and 'dialogue_end'
. These are used to block together sections.
In the case of dual dialogue, it allows Fountain-ts to attach a dual
property to blocks of dialogue.
FAQs
A Typescript based parser for the screenplay format Fountain. Source originally from Matt Daly's fountain.js
The npm package fountain.ts receives a total of 4 weekly downloads. As such, fountain.ts popularity was classified as not popular.
We found that fountain.ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.