Demo editing tools with js bindings
  • Rust 94%
  • Nix 2.4%
  • JavaScript 2.2%
  • TypeScript 1.4%
Find a file
2025-06-18 22:24:11 +02:00
js add count_ticks method 2022-10-26 22:57:41 +02:00
wasm builder updates 2025-06-18 22:24:11 +02:00
.envrc init 2022-09-10 16:46:33 +02:00
.gitignore cargo updates 2025-05-02 19:24:58 +02:00
flake.lock flake update 2025-05-02 19:24:41 +02:00
flake.nix flake update 2025-05-02 19:24:41 +02:00
LICENSE_APACHE init 2022-09-10 16:46:33 +02:00
LICENSE_MIT init 2022-09-10 16:46:33 +02:00
out.txt init 2022-09-10 16:46:33 +02:00
package-lock.json js bindings 2022-10-23 17:01:34 +02:00
package.json packaging 2023-11-24 22:24:36 +01:00
README.md builder updates 2025-06-18 22:24:11 +02:00
tsconfig.json js bindings 2022-10-23 17:01:34 +02:00
webpack.config.js packaging 2023-11-24 22:24:36 +01:00

Demo editor

Command line editor

Building

cd wasm
cargo b --release --features cli

binary can be found at target/release/edit

Usage

edit [options] <path.dem>

See edit --help for the available options.

Rust api

use edit::{edit, EditOptions, TickRange};

fn main() {
    let options = EditOptions::builder()
        .unlock_pov(true)
        .remove_invalid_deletes(self.remove_invalid_deletes)
        .cut(TickRange {
            from: from.into(),
            to: to.into(),
        }).build();
    let input = fs::read("in.demo").unwrap();
    let output = edit(&input, options);
    fs::write("out.dem", output).unwrap();
}