twee-parser 0.1.6

A parser for Twine stories
Documentation
1
2
3
4
5
6
7
8
9
10
use std::{fs::File, io::Write};

use twee_parser::*;


pub fn main() {
    let mut story = parse_twee3(include_str!("../test-data/Test Story.twee")).unwrap().0;
    story.title = "My Story".to_string();
    File::create("example1.twee").unwrap().write_all(serialize_twee3(&story).as_bytes()).unwrap();
}