更新自动打开文件夹功能
This commit is contained in:
@ -57,3 +57,7 @@
|
|||||||
- 重新进度条支持!美观了不少啊
|
- 重新进度条支持!美观了不少啊
|
||||||
### Refactoring
|
### Refactoring
|
||||||
- :hammer: 重构大量代码!
|
- :hammer: 重构大量代码!
|
||||||
|
|
||||||
|
## [2.6.11] - 2025.3.15
|
||||||
|
### Features :sparkles:
|
||||||
|
- 更新自动打开文件夹选项,当解密结束后自动调用文件管理器打开输出目录
|
||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -811,7 +811,7 @@ checksum = "07dcca13d1740c0a665f77104803360da0bdb3323ecce2e93fa2c959a6d52806"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ncmmiao"
|
name = "ncmmiao"
|
||||||
version = "2.5.11"
|
version = "2.6.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"audiotags",
|
"audiotags",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ncmmiao"
|
name = "ncmmiao"
|
||||||
version = "2.5.11"
|
version = "2.6.11"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Lkhsss <lkhsss1019@gmail.com>"]
|
authors = ["Lkhsss <lkhsss1019@gmail.com>"]
|
||||||
description = "A magic tool convert ncm to flac"
|
description = "A magic tool convert ncm to flac"
|
||||||
|
|||||||
@ -1,14 +1,16 @@
|
|||||||
# NcmMiao :tada:
|
# NcmMiao :tada:
|
||||||
[](https://github.com/Lkhsss/NcmMiao/actions/workflows/build.yml)
|
[](https://github.com/Lkhsss/NcmMiao/actions/workflows/build.yml)
|
||||||
|
|
||||||
一个使用Rust语言编写的ncm文件解密工具(第一!😆)。
|
一个使用Rust语言编写的ncm文件解密工具😆。
|
||||||
|
|
||||||
### 功能及特点
|
### 功能及特点
|
||||||
- 支持单一文件,多文件夹递归批量解密。
|
- 支持单一文件,多文件夹递归批量解密。
|
||||||
- 完善的日志功能
|
- 完善的日志功能
|
||||||
- Colorful
|
- Colorful
|
||||||
- 编译文件小,解密快
|
- 编译文件小,解密快
|
||||||
- [New!]支持自动添加封面!
|
- 支持自动添加封面!
|
||||||
|
- 自动打开输出文件夹
|
||||||
|
- 简约美观
|
||||||
|
|
||||||
## 编译
|
## 编译
|
||||||
```
|
```
|
||||||
|
|||||||
@ -19,4 +19,8 @@ pub struct Cli {
|
|||||||
/// 强制覆盖保存开关
|
/// 强制覆盖保存开关
|
||||||
#[arg(short, long, name = "强制覆盖开关")]
|
#[arg(short, long, name = "强制覆盖开关")]
|
||||||
pub forcesave: bool,
|
pub forcesave: bool,
|
||||||
|
|
||||||
|
/// 自动打开输出目录
|
||||||
|
#[arg(short,long,name="自动打开输出目录")]
|
||||||
|
pub autoopen:bool,
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/main.rs
10
src/main.rs
@ -19,6 +19,7 @@ mod ncmdump;
|
|||||||
mod pathparse;
|
mod pathparse;
|
||||||
mod test;
|
mod test;
|
||||||
mod threadpool;
|
mod threadpool;
|
||||||
|
mod opendir;
|
||||||
use ncmdump::Ncmfile;
|
use ncmdump::Ncmfile;
|
||||||
|
|
||||||
const DEFAULT_MAXWORKER:usize = 8;
|
const DEFAULT_MAXWORKER:usize = 8;
|
||||||
@ -118,7 +119,14 @@ fn main() {
|
|||||||
successful.to_string().bright_green(),
|
successful.to_string().bright_green(),
|
||||||
(taskcount - successful).to_string().bright_red(),
|
(taskcount - successful).to_string().bright_red(),
|
||||||
showtime()
|
showtime()
|
||||||
)
|
);
|
||||||
|
|
||||||
|
// 自动打开输出文件夹
|
||||||
|
if cli.autoopen{
|
||||||
|
opendir::opendir(outputdir.into());
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
|
|||||||
34
src/opendir.rs
Normal file
34
src/opendir.rs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
use log::error;
|
||||||
|
use std::{path::PathBuf, process::Command};
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
pub fn opendir(dir: PathBuf) {
|
||||||
|
match Command::new("explorer")
|
||||||
|
.arg(&dir) // <- Specify the directory you'd like to open.
|
||||||
|
.spawn()
|
||||||
|
{
|
||||||
|
Err(_) => error!("无法打开输出文件夹:[{}]", dir.display()),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
pub fn opendir(dir: PathBuf) {
|
||||||
|
match Command::new("open")
|
||||||
|
.arg(&dir) // <- Specify the directory you'd like to open.
|
||||||
|
.spawn()
|
||||||
|
{
|
||||||
|
Err(_) => error!("无法打开输出文件夹:[{}]", dir.display()),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
pub fn opendir(dir: PathBuf) {
|
||||||
|
match Command::new("open")
|
||||||
|
.arg(&dir) // <- Specify the directory you'd like to open.
|
||||||
|
.spawn()
|
||||||
|
{
|
||||||
|
Err(_) => error!("无法打开输出文件夹:[{}]", dir.display()),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user