From 1ec23463f803147591f82085c4e3315facc2bd16 Mon Sep 17 00:00:00 2001 From: biluohc Date: Sat, 12 Aug 2017 19:27:59 +0800 Subject: [PATCH] 0.3.1 release --- Cargo.lock | 37 ++++++++++++++----------------------- Cargo.toml | 8 ++++---- readme.md | 6 +++--- src/args.rs | 36 ++++++++++++++++++------------------ src/coll/url.rs | 4 ++-- src/main.rs | 6 +++--- 6 files changed, 44 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a2b4397..b490c39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,10 +1,10 @@ [root] name = "zipcs" -version = "0.3.0" +version = "0.3.1" dependencies = [ - "app 0.6.0 (git+https://github.com/biluohc/app-rs)", + "app 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "poolite 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "poolite 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "requests 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)", "stderr 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "urlparse 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -28,7 +28,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "app" version = "0.6.0" -source = "git+https://github.com/biluohc/app-rs#930890c47bd2838d06a5ef8d0350fe6b9029367d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "stderr 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -322,7 +322,7 @@ name = "native-tls" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -339,19 +339,19 @@ dependencies = [ [[package]] name = "openssl" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", @@ -376,11 +376,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "poolite" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "stderr 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stderr 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -455,14 +455,6 @@ dependencies = [ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "stderr" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "stderr" version = "0.8.0" @@ -576,7 +568,7 @@ dependencies = [ [metadata] "checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum app 0.6.0 (git+https://github.com/biluohc/app-rs)" = "" +"checksum app 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5020e53d3c62e2fdb56a1b86e8a8e99420e5b81628e1eeb3167320bea96a1a7c" "checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" @@ -616,12 +608,12 @@ dependencies = [ "checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958" "checksum native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04b781c9134a954c84f0594b9ab3f5606abc516030388e8511887ef4c204a1e5" "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584" -"checksum openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f776f1d8af832fd2c637ee182c801e8f7ea8895718a2be9914cca001f6e2c40a" -"checksum openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "ad95f8160d1c150c4f44d4c4959732e048ac046c37f597fe362f8bf57561ffb4" +"checksum openssl 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)" = "63c619be70f3187485d8257bf36106b83028681c25d10ca052f9789c86b04976" +"checksum openssl-sys 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)" = "56d52dd5231a25d3dd9e82e32832cfabe35d9dba6fdc8d0b90622da7dcc73146" "checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" "checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0" -"checksum poolite 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8cf3e5bba8e4c063be34bfe47ee73e69467d7e58fc9450621cee31e09ced10" +"checksum poolite 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2c889c8361df503d1a10d6e2247ce884ae83316566de9bf29bbc399503bcf106" "checksum quick-error 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c36987d4978eb1be2e422b1e0423a557923a5c3e7e6f31d5699e9aafaefa469" "checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" "checksum redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8312fba776a49cf390b7b62f3135f9b294d8617f7a7592cfd0ac2492b658cd7b" @@ -630,7 +622,6 @@ dependencies = [ "checksum secur32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f412dfa83308d893101dd59c10d6fda8283465976c28c287c5c855bf8d216bc" "checksum security-framework 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2715b5d3f24775c3213a715276f0ce2eca746ca604d7b78fc71ddc2fd6951d" "checksum security-framework-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f15de3b59a3dc60c6ef2ce3d3ed098e5db03b55946f290e8434e2a491c3d12" -"checksum stderr 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c5fba0c036c2c62b6c6ffd9c8e5c91938aaf5eb00a093ecf962dbe7b9a013fc" "checksum stderr 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee63545cb3066bed00544996fb5b545426632bf7d14ab3e6567602a49819ef8" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" "checksum term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f2077e54d38055cf1ca0fd7933a2e00cd3ec8f6fed352b2a377f06dcdaaf3281" diff --git a/Cargo.toml b/Cargo.toml index 9c266fb..b59d461 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zipcs" -version = "0.3.0" +version = "0.3.1" authors = ["Wspsxing "] description = "Useful tools collection" repository = "https://github.com/biluohc/zipcs" @@ -28,11 +28,11 @@ urlparse = "^0.7.3" requests = "^0.0.30" stderr = "0.8.0" -poolite = "0.6.2" -# app = "0.5.6" +poolite = "0.6.3" +app = "0.6.0" # stderr = { git="https://github.com/biluohc/stderr", version= "0.7.1" } # stderr = { path = "../stderr" } -app = { git = "https://github.com/biluohc/app-rs", branch="master", version ="0.6.0" } +# app = { git = "https://github.com/biluohc/app", branch="master", version ="0.6.0" } # app = { path = "../app" } diff --git a/readme.md b/readme.md index 500023c..63cae32 100644 --- a/readme.md +++ b/readme.md @@ -21,7 +21,7 @@ cargo +nightly build --release ### Help ```sh -zipcs 0.3.0 +zipcs 0.3.1 Useful tools collection AUTHOR: @@ -40,8 +40,8 @@ OPTIONS: CAMMANDS: zip, z Unzip with charset setting - path, P Path decoding with charset setting - file, f File encoding/decoding with charset setting + path, P Paths decoding with charset setting + file, f Files encoding/decoding with charset setting ping, p ping domains/ips ip, i Get ip address url, u Urls decoding/encoding diff --git a/src/args.rs b/src/args.rs index 9f56f4a..bc5dac9 100644 --- a/src/args.rs +++ b/src/args.rs @@ -30,53 +30,53 @@ impl Config { .sort_key("1") .desc("Unzip with charset setting") .opt(Opt::new("list", &mut list) - .short("l") + .short('l') .long("list") .help("Only list files from ZipArchives")) .opt(Opt::new("charset", &mut config.zip.charset) - .short("cs") + .short('c') .long("charset") .help(&charsets)) .opt(Opt::new("outdir", &mut config.zip.outdir) - .short("o") + .short('o') .long("outdir") .help("Sets Output directory")) .args(Args::new("ZipArchive", &mut config.zip.zips).help("ZipArchive need to unzip"))) .cmd(Cmd::new("path") .short("P") .sort_key("2") - .desc("Path decoding with charset setting") + .desc("Paths decoding with charset setting") .opt(Opt::new("charset", &mut config.path.charset) - .short("cs") + .short('c') .long("charset") .help(&charsets)) .opt(Opt::new("depth", &mut config.path.depth) - .short("d") + .short('d') .long("depth") .help("decode paths recursively depth")) .opt(Opt::new("store", &mut config.path.store) - .short("s") + .short('s') .long("store") .help("store result by rename")) .opt(Opt::new("link", &mut config.path.link) - .short("l") + .short('l') .long("link") .help("follow symbolic links")) .args(Args::new("Path", &mut config.path.strs).help("Path need to decode"))) .cmd(Cmd::new("file") .short("f") .sort_key("3") - .desc("File encoding/decoding with charset setting") + .desc("Files encoding/decoding with charset setting") .opt(Opt::new("charset", &mut config.file.charset) - .short("cs") + .short('c') .long("charset") .help(&charsets)) .opt(Opt::new("charset_out", &mut config.file.charset_out) - .short("co") + .short('C') .long("charset-out") .help("charset output(encode) using")) .opt(Opt::new("store", &mut config.file.store) - .short("s") + .short('s') .long("store") .help("store result by rewrite")) .args(Args::new("File", &mut config.file.strs).help("File need to encode/decode"))) @@ -85,14 +85,14 @@ impl Config { .sort_key("4") .desc("ping domains/ips") .opt(Opt::new("count", &mut config.ping.count) - .short("c") + .short('c') .long("count") .help("stop after sending count ECHO_REQUEST packets")) .opt(Opt::new("_6", &mut config.ping._6) - .short("6") + .short('6') .help("use IPV6")) .opt(Opt::new("only-line", &mut config.ping.only_line) - .short("l") + .short('l') .long("only-line") .help("print result only-line")) .args(Args::new("Host/IP", &mut config.ping.hosts).help("Host or IP need to ping"))) @@ -105,11 +105,11 @@ impl Config { .sort_key("6") .desc("Urls decoding/encoding") .opt(Opt::new("encode", &mut config.url.is_encode) - .short("e") + .short('e') .long("encode") .help("encode(default is decode)")) .opt(Opt::new("plus", &mut config.url.is_plus) - .short("p") + .short('p') .long("plus") .help("replaces ' ' with '+'")) .args(Args::new("Url", &mut config.url.strs).help("Url need to decode/encode"))) @@ -166,7 +166,7 @@ impl<'app, 's: 'app> OptValueParse<'app> for &'s mut CharSet { } fn parse(&mut self, opt_name: String, msg: &str) -> Result<(), String> { match CharSet::new(msg) { - Err(_) => return Err(format!("OPTION({}) parse fails: \"{}\"", opt_name, msg)), + Err(_) => return Err(format!("OPTION(<{}>) parse fails: \"{}\"", opt_name, msg)), Ok(o) => **self = o, } Ok(()) diff --git a/src/coll/url.rs b/src/coll/url.rs index 73d598c..4c6b485 100644 --- a/src/coll/url.rs +++ b/src/coll/url.rs @@ -22,10 +22,10 @@ impl Urls { }; match rest { Ok(o) => { - println!("{}\n {}", str, o); + println!("{}", o); } Err(o) => { - println!("{}\n {:?}", str, o); + errln!("{:?}", o); } } diff --git a/src/main.rs b/src/main.rs index 3baafda..58f2ce6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ cargo +nightly build --release ## Help ```sh -zipcs 0.3.0 +zipcs 0.3.1 Useful tools collection AUTHOR: @@ -39,8 +39,8 @@ OPTIONS: CAMMANDS: zip, z Unzip with charset setting - path, P Path decoding with charset setting - file, f File encoding/decoding with charset setting + path, P Paths decoding with charset setting + file, f Files encoding/decoding with charset setting ping, p ping domains/ips ip, i Get ip address url, u Urls decoding/encoding