Browse Source

u seahorse 1.0.0

master
syui 1 year ago
parent
commit
ca492b2468
No known key found for this signature in database GPG Key ID: ED2A0F5F1DA25512
  1. 8
      Cargo.lock
  2. 4
      Cargo.toml
  3. 31
      readme.md
  4. 20
      src/main.rs

8
Cargo.lock

@ -202,7 +202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "seahorse"
version = "0.7.1"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -248,12 +248,12 @@ dependencies = [
[[package]]
name = "udrs"
version = "0.1.4"
version = "0.1.7"
dependencies = [
"base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
"dns-lookup 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_env_logger 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"seahorse 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"seahorse 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -338,7 +338,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692"
"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
"checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
"checksum seahorse 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "24ad40c7a40cb8a26a35098088edc42c29044f273645d9ff4d50b1853a176eaa"
"checksum seahorse 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48badc1e4709936b554463f45691c5c5d667c2203a6872aa4283bc14bed3e9c7"
"checksum smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
"checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"

4
Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "udrs"
version = "0.1.4"
version = "0.1.7"
authors = ["syui <syui@syui.cf>"]
edition = "2018"
@ -8,5 +8,5 @@ edition = "2018"
url = "1.7"
pretty_env_logger = "0.2"
base64 = "0.9.2"
seahorse = "0.7.1"
seahorse = "1.0.0"
dns-lookup = "1.0.2"

31
readme.md

@ -8,31 +8,6 @@ $ cargo run d "aGVsbG8gd29ybGQu"
hello world.
```
### v0.1.1
```sh
# pipe
$ echo "foo%20bar" | udrs
```
### v0.1.2
```sh
# debug
$ RUST_LOG=udrs=debug ./udrs "foo%20bar"
# makefile
$ make run
$ make install
```
### v0.1.3
```sh
#base64 encode
$ udrs b64e "hello"
```
### v0.1.4
```sh
@ -71,3 +46,9 @@ $ dig github.com
52.192.72.89
```
### v0.1.7
```
seahorse "0.7.1" -> "1.0.0"
```

20
src/main.rs

@ -6,20 +6,17 @@ use dns_lookup::{getaddrinfo, AddrInfoHints, SockType};
fn main() {
let args: Vec<String> = env::args().collect();
let app = App::new()
.name(env!("CARGO_PKG_NAME"))
let app = App::new(env!("CARGO_PKG_NAME"))
.author(env!("CARGO_PKG_AUTHORS"))
.version(env!("CARGO_PKG_VERSION"))
.usage("cli_tool [command] [x] [y]")
.command(
Command::new()
.name("e")
Command::new("e")
.usage("udrs e {}")
.action(e),
)
.command(
Command::new()
.name("d")
Command::new("d")
.usage("udrs d {}")
.action(d),
)
@ -74,40 +71,39 @@ fn ud_a(c: &Context) {
}
fn ud_c() -> Command {
Command::new()
.name("ud")
Command::new("ud")
.usage("cli ud [url...]")
.action(ud_a)
.flag(
Flag::new(
"lpath",
"cli ud [url...] --lpath(-l)",
FlagType::Bool,
)
.usage("udrs ud [url...] --lpath(-l)")
.alias("l"),
)
.flag(
Flag::new(
"domain",
"cli ud [url...] --domain(-d)",
FlagType::Bool,
)
.usage("udrs ud [url...] --domain(-d)")
.alias("d"),
)
.flag(
Flag::new(
"protocol",
"cli ud [url...] --protocol(-p)",
FlagType::Bool,
)
.usage("udrs ud [url...] --protocol(-p)")
.alias("p"),
)
.flag(
Flag::new(
"ip",
"cli ud [url...] --ip(-i)",
FlagType::Bool,
)
.usage("udrs ud [url...] --ip(-i)")
.alias("i"),
)
}

Loading…
Cancel
Save