5 releases (breaking)
0.5.0 | Mar 3, 2023 |
---|---|
0.4.0 | Jan 31, 2023 |
0.3.0 | Jan 18, 2023 |
0.2.0 | May 20, 2022 |
0.1.0 | Sep 25, 2019 |
#98 in Audio
51 downloads per month
49KB
972 lines
Ncmdump.rs
Credit
Origin
- anonymous5l/ncmdump: Original repository
- MegrezZhu/qmcdump: Original repository
Binary Usage
Install
You can install by Cargo.
cargo install ncmdump
Simple usage
ncmdump [FILES]...
More options
Usage: ncmdump [OPTIONS] [FILES]...
Arguments:
[FILES]... Specified the files to convert
Options:
-o, --output <OUTPUT> Specified the output directory. Default it's the same directory with input file
-v, --verbose Verbosely list files processing
-h, --help Print help
-V, --version Print version
Library Usage
Install
You can add this to your Cargo.toml
:
ncmdump = "0.5.0"
Also, you can use this command to install this crate, if you installed cargo-edit
cargo add ncmdump
Simple Usage
use std::fs::File;
use std::path::Path;
use anyhow::Result;
use ncmdump::Ncmdump;
fn main() -> Result<()> {
use std::io::Write;
let file = File::open("tests/test.ncm")?;
let mut ncm = Ncmdump::from_reader(file)?;
let music = ncm.get_data()?;
let mut target = File::options()
.create(true)
.write(true)
.open("tests/test.flac")?;
target.write_all(&music)?;
Ok(())
}
For more usage, please check the document.
Dependencies
~4–9.5MB
~172K SLoC