Skip to content

Commit 86216ca

Browse files
authored
Merge pull request #5 from ZimCodes/clap
Clap.rs Migration
2 parents 30fa223 + 02098ba commit 86216ca

9 files changed

Lines changed: 225 additions & 186 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ body:
99
- type: checkboxes
1010
id: support_check
1111
attributes:
12-
label: OD Support
12+
label: Is OD Support
1313
description: Is the OD part of the currently supported list?
1414
options:
15-
- label: OD
15+
- label: Is supported
1616
required: true
1717
- type: input
1818
id: summary
@@ -31,8 +31,9 @@ body:
3131
- type: textarea
3232
id: sources
3333
attributes:
34-
label: Screenshots/Links
35-
description: If applicable, add screenshots and/or a link to help explain your problem.'
34+
label: References
35+
description: If applicable, add references (such as screenshots, links) to help
36+
explain your problem.
3637
validations:
3738
required: false
3839
- type: textarea
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Feature Request
22
description: Suggest an idea for this project
33
title: "New Feature"
4-
labels: ["enhancement"]
4+
labels: [ "enhancement" ]
55
body:
66
- type: input
77
id: summary
@@ -10,24 +10,25 @@ body:
1010
description: Provide a clear and concise description of the issue.
1111
validations:
1212
required: true
13-
- type: textarea
14-
id: details
15-
attributes:
16-
label: Details
17-
description: Provide a detailed description of the issue as well as how to reproduce it.
18-
validations:
19-
required: true
20-
- type: textarea
21-
id: sources
22-
attributes:
23-
label: Screenshots/Links
24-
description: If applicable, add screenshots and/or a link to help explain your problem.'
25-
validations:
26-
required: false
27-
- type: textarea
28-
id: comments
29-
attributes:
30-
label: Comments
31-
description: Any other information you would like to add?
32-
validations:
33-
required: false
13+
- type: textarea
14+
id: details
15+
attributes:
16+
label: Details
17+
description: Provide a detailed description of the issue as well as how to reproduce it.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: sources
22+
attributes:
23+
label: References
24+
description: If applicable, add references (such as screenshots, links) to help explain your
25+
problem.
26+
validations:
27+
required: false
28+
- type: textarea
29+
id: comments
30+
attributes:
31+
label: Comments
32+
description: Any other information you would like to add?
33+
validations:
34+
required: false

.github/ISSUE_TEMPLATE/new-od-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: New OD request
22
description: Suggest support for a new Open Directory
33
title: "New OD"
4-
labels: ["new od"]
4+
labels: [ "new od" ]
55
assignees:
66
- ZimCodes
77
body:

Cargo.lock

Lines changed: 62 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "zeiver"
3-
version = "0.8.4"
3+
version = "0.8.5"
44
authors = ["ZimCodes <23222943+ZimCodes@users.noreply.github.com>"]
55
edition = "2021"
66
description = "Web crawler designed to scrape, record, download, & scan content from ODs"
@@ -28,5 +28,6 @@ members = [
2828
crawler = {path = "./crawler"}
2929
cmd_opts = {path = "./cmd_opts"}
3030
logger = {path = "./logger"}
31-
reqwest = "0.11.4"
31+
reqwest = "~0.11.4"
3232
tokio = { version = "1.10.1", features = ["time","rt","macros","rt-multi-thread"] }
33+
base64 = "~0.13.0"

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ To **install/update** Zeiver follow these steps:
8585
The following code downloads files from _example.com/xms/imgs_, saves them in a local directory called _Cool_Content_,
8686
& sends a request with the ACCEPT-LANGUAGE header.
8787

88-
`zeiver -h "accept-language$fr-CH, en;q=0.8, de;q=0.7" -o "./Cool_Content" example.com/xms/imgs`
88+
`zeiver -H "accept-language$fr-CH, en;q=0.8, de;q=0.7" -o "./Cool_Content" https://example.com/xms/imgs`
8989

9090
## Commands
9191
### Positional
@@ -279,10 +279,19 @@ Restrict Zeiver to send all requests through HTTPS connections only.
279279

280280
***-H, --headers***
281281

282-
Sets the default headers to use for every request. *_Must use the __'header$value'__ format. Each header must also be
283-
**separated by a comma**._
282+
Sets the default headers to use for every request. *_Must use the __'header$value'__ format.
283+
**Can be used multiple times!**
284284

285-
Ex: `zeiver -H content-length$128,"accept$ text/html, application/xhtml+xml, image/webp"`
285+
Ex: `zeiver -H "accept$ text/html, application/xhtml+xml, image/webp" -H "content-length$128"`
286+
287+
***--auth***
288+
289+
The Basic Authentication to use.
290+
291+
The basic authentication needed to use a _closed_ directory. This is a shortcut for using the
292+
`Authorization: Basic` header. _Must use the_ `username:password` _format._
293+
294+
Ex: `zeiver --auth "demo:say it"`
286295

287296
***-u***
288297

cmd_opts/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "cmd_opts"
3-
version = "0.8.3"
3+
version = "0.8.5"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
structopt = "~0.3.22"
9+
clap = {version = "~3.2.10", features = ["derive"]}

0 commit comments

Comments
 (0)