Skip to content

Commit

Permalink
0.3.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
biluohc committed Aug 12, 2017
1 parent 31df0e8 commit 1ec2346
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 53 deletions.
37 changes: 14 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zipcs"
version = "0.3.0"
version = "0.3.1"
authors = ["Wspsxing <[email protected]>"]
description = "Useful tools collection"
repository = "https://github.com/biluohc/zipcs"
Expand Down Expand Up @@ -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" }

6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cargo +nightly build --release
### Help

```sh
zipcs 0.3.0
zipcs 0.3.1
Useful tools collection

AUTHOR:
Expand All @@ -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
Expand Down
36 changes: 18 additions & 18 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand All @@ -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")))
Expand All @@ -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")))
Expand Down Expand Up @@ -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<CharSet> fails: \"{}\"", opt_name, msg)),
Err(_) => return Err(format!("OPTION(<{}>) parse<CharSet> fails: \"{}\"", opt_name, msg)),
Ok(o) => **self = o,
}
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions src/coll/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ impl Urls {
};
match rest {
Ok(o) => {
println!("{}\n {}", str, o);
println!("{}", o);
}
Err(o) => {
println!("{}\n {:?}", str, o);
errln!("{:?}", o);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cargo +nightly build --release
## Help
```sh
zipcs 0.3.0
zipcs 0.3.1
Useful tools collection
AUTHOR:
Expand All @@ -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
Expand Down

0 comments on commit 1ec2346

Please sign in to comment.