2 releases

0.1.1 Jun 3, 2023
0.1.0 Jun 3, 2023

#6 in #plist

32 downloads per month
Used in machaka

MIT license

12KB
88 lines

Plistt   Build Status Latest Version Rust 2021

Plistt a rust library and command-line tool to convert xml-encoded plist data into json.


Plistt in action

Click to show Cargo.toml. Run this code in the playground.
[dependencies]

plistt = { version = "0.1.1" }

use plistt::json;
use plistt::{BufReader, BufWriter};
use std::fs::OpenOptions;
use std::io::{Cursor};
use std::process::Command;
use std::path::Path;

fn main() {
    let ioreg = Command::new("ioreg")
        .arg("-c")
        .arg("IOUSB")
        .arg("-a")
        .output()
        .unwrap();
    let input = BufReader::new(Cursor::new(ioreg.stdout));

    let stdout = OpenOptions::new()
        .write(true)
        .open(Path::new("/dev/stdout"))
        .unwrap();

    let output = BufWriter::new(stdout);

    json::transcode_from_xml_reader(input, output)
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Plistt by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~6–19MB
~228K SLoC