htmldiff 0.1.0

htmldiff is a Rust port of https://github.com/myobie/htmldiff
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 19.06 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.15 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Documentation
  • seikichi/htmldiff
    6 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • seikichi

htmldiff

Rust port of myobie/htmldiff.

Installation

Cargo

$ cargo install htmldiff

Manual

You can download prebuilt binaries in the releases section, or create from source.

$ git clone https://github.com/seikichi/htmldiff.git
$ cd htmldiff
$ cargo build --release

Run

$ cat old.html
<p>Hello, world!</p>
$ cat new.html
<p>Hello, seikichi!</p>
$ htmldiff old.html new.html
<p>Hello, <del>world!</del><ins>seikichi!</ins></p>

Use as Library

Add the following to your Cargo.toml file:

[dependencies]
htmldiff = "0.1"

Next, call htmldiff::htmldiff function in your code:

extern crate htmldiff;

fn main() {
    let old = "<p>Hello, world!</p>";
    let new = "<p>Hello, seikichi!</p>";
    println!("{}", htmldiff::htmldiff(old, new));
}

License

MIT