Skip to content

Instantly share code, notes, and snippets.

@videlais
Created June 29, 2019 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/cbb21b7d3ee191360da910542a074da7 to your computer and use it in GitHub Desktop.
Save videlais/cbb21b7d3ee191360da910542a074da7 to your computer and use it in GitHub Desktop.
const FileReader = require('extwee/FileReader.js');
const TweeParser = require('extwee/TweeParser.js');
const StoryFormatParser = require('extwee/StoryFormatParser.js');
const HTMLWriter = require('extwee/HTMLWriter.js');
let textfile = "test.twee";
let storyFormat = "format.js";
let outputFile = "example.html";
let fr = new FileReader(textfile);
let tp = new TweeParser(fr.contents);
let sfp = new StoryFormatParser(storyFormat);
let hw = new HTMLWriter(outputFile, tp.story, sfp.JSON);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment