packlist : +reset utility

fogti
Sep 20, 2021, 9:07 PM
JWYGE7FX2NKJEDVDP22JW4NH2VYHPM637MOKFWAAAMN3FRB3D25AC

Dependencies

Change contents

  • file addition: bin (d--r------)
    [2.41]
  • file addition: zhed-packlist-reset.rs (----------)
    [0.15]
    use std::io::Read;
    // USAGE: zhed-packlist-reset < pl.old > pl.new
    fn main() {
    let mut inp = String::new();
    std::io::stdin().lock().read_to_string(&mut inp).expect("unable to read packlist from stdin");
    let mut pl: zhed_packlist::PackList = inp.parse().expect("unable to parse packlist");
    pl.reset_premarkers();
    print!("{}", pl);
    }