This commit is contained in:
Robin Appelman 2022-09-10 16:46:33 +02:00
commit 96a8d88394
27 changed files with 204047 additions and 0 deletions

17
src/edit.rs Normal file
View file

@ -0,0 +1,17 @@
use clap::Parser;
use edit::{EditOptions, rust_edit};
use std::fs;
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
struct Args {
/// Path to the source demo
path: String,
}
fn main() {
let args = Args::parse();
let file = fs::read(&args.path).unwrap();
let output = rust_edit(&file, EditOptions::default());
fs::write("out.dem", output).unwrap();
}