mirror of
https://codeberg.org/demostf/edit.git
synced 2026-11-30 10:00:50 +01:00
init
This commit is contained in:
commit
96a8d88394
27 changed files with 204047 additions and 0 deletions
17
src/edit.rs
Normal file
17
src/edit.rs
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue