Crates.io | ncmdump |
lib.rs | ncmdump |
version | 0.7.3 |
source | src |
created_at | 2019-09-25 09:59:38.460061 |
updated_at | 2024-07-10 17:48:13.200759 |
description | Some copyright protection file dump. |
homepage | https://github.com/iqiziqi/ncmdump.rs |
repository | https://github.com/iqiziqi/ncmdump.rs |
max_upload_size | |
id | 167525 |
size | 50,346 |
You can install by Cargo.
cargo install ncmdump
ncmdump [FILES]...
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
You can add this to your Cargo.toml
:
ncmdump = "0.7.3"
Also, you can use this command to install this crate, if you installed cargo-edit
cargo add ncmdump
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("res/test.ncm")?;
let mut ncm = Ncmdump::from_reader(file)?;
let music = ncm.get_data()?;
let mut target = File::options()
.create(true)
.write(true)
.open("res/test.flac")?;
target.write_all(&music)?;
Ok(())
}
For more usage, please check the document.