Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 1.45 KB

README.md

File metadata and controls

72 lines (51 loc) · 1.45 KB

Ncmdump.rs

Credit

Origin

Binary Usage

Simple usage

ncmdump -f [files ...]

More options

USAGE:
    ncmdump [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -i, --info       Only show the information of files
    -V, --version    Prints version information
    -v, --verbose    Verbosely list files processing

OPTIONS:
    -f, --files <files>...    Specified the files
    -o, --output <output>     Specified the output directory

Library Usage

Install

You can add this to your Cargo.toml:

ncmdump = "0.1.0"

Also, you can use this command to install this crate, if you installed cargo-edit

cargo add ncmdump

Simple Usage

use std::fs::{read, write};
use std::path::Path;

fn main() -> Result<()> {
    let input_path = Path::new("tests/test.ncm");
    let output_path = Path::new("tests/test.flac");
    let buffer = read(&input_path)?;
    let data = ncmdump::convert(&buffer)?;
    write(&output_path, data)?;
    Ok(())
}

For more usage, please check the document.