Add LICENSE and README
This commit is contained in:
parent
69288185c1
commit
60daca96ca
3 changed files with 60 additions and 22 deletions
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 endernon
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
15
readme.md
Normal file
15
readme.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# respack-decrypter
|
||||||
|
|
||||||
|
This tool
|
||||||
|
|
||||||
|
# I want some logs
|
||||||
|
|
||||||
|
Pipe your output to a new filename.
|
||||||
|
|
||||||
|
Note: It might not work for SOME linux shells. But major ones e.g. `zsh`,`bash` support it.
|
||||||
|
|
||||||
|
`respack-decrypter --path ~/somedir > ~/log.txt`
|
||||||
|
|
||||||
|
# License
|
||||||
|
|
||||||
|
It's all MIT, except the example inventory.png which is courtesy of Wynncraft. Zeer you better not come after me for this one
|
46
src/main.rs
46
src/main.rs
|
@ -9,12 +9,14 @@ use std::path::{Path, PathBuf};
|
||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// Input path
|
/// Input path
|
||||||
|
///
|
||||||
|
/// Include a file path or a directory path. Do not use any asterisks or wildcards.
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
path: Vec<PathBuf>,
|
path: PathBuf,
|
||||||
|
|
||||||
/// Output path
|
/// Output path
|
||||||
#[arg(short, long)]
|
#[arg(short, long,default_value="")]
|
||||||
out: Option<PathBuf>,
|
out: PathBuf,
|
||||||
|
|
||||||
/// Debug mode
|
/// Debug mode
|
||||||
#[arg(short, long, default_value_t=false)]
|
#[arg(short, long, default_value_t=false)]
|
||||||
|
@ -44,29 +46,29 @@ fn main() {
|
||||||
if pathtype.is_file() {
|
if pathtype.is_file() {
|
||||||
|
|
||||||
}
|
}
|
||||||
// else if pathtype.is_dir() {
|
else if pathtype.is_dir() {
|
||||||
// // parse file list if it's a dir
|
// parse file list if it's a dir
|
||||||
// for entry in glob(&format!("{}/**/*.png", pathfr.clone().display())).expect("Failed to read glob pattern (you should panic)") {
|
for entry in glob(&format!("{}/**/*.png", pathfr.clone().display())).expect("Failed to read glob pattern (you should panic)") {
|
||||||
// match entry {
|
match entry {
|
||||||
// Ok(path) => {
|
Ok(path) => {
|
||||||
// // println!("{:?}", path.display());
|
// println!("{:?}", path.display());
|
||||||
// filelist.push(path.display().to_string());
|
filelist.push(path.display().to_string());
|
||||||
// },
|
},
|
||||||
// Err(e) => {
|
Err(e) => {
|
||||||
// println!("Shell globbing error");
|
println!("Shell globbing error");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// panic!("")
|
panic!("that input is neither file nor dir and thats scary")
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
if realdebugmode {
|
if realdebugmode {
|
||||||
for i in filelist {
|
for i in filelist {
|
||||||
println!("{i}")
|
println!("List of files: {i}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue