-
Notifications
You must be signed in to change notification settings - Fork 12
/
wcurl.1
127 lines (127 loc) · 4.97 KB
/
wcurl.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.\" **************************************************************************
.\" Copyright (C) Samuel Henrique <[email protected]>, Sergio Durigan
.\" Junior <[email protected]> and many contributors, see the AUTHORS
.\" file.
.\"
.\" Permission to use, copy, modify, and distribute this software for any purpose
.\" with or without fee is hereby granted, provided that the above copyright
.\" notice and this permission notice appear in all copies.
.\"
.\" 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 OF THIRD PARTY RIGHTS. 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.
.\"
.\" Except as contained in this notice, the name of a copyright holder shall not be
.\" used in advertising or otherwise to promote the sale, use or other dealings in
.\" this Software without prior written authorization of the copyright holder.
.\"
.\" SPDX-License-Identifier: curl
.\" **************************************************************************
.TH wcurl "1" "2024.12.08+dev" "wcurl" "User Commands"
.SH NAME
.B wcurl
- a simple wrapper around curl to easily download files.
.SH SYNOPSIS
.nf
\fBwcurl \fI<URL>\fP...\fR
\fBwcurl [\-\-curl\-options \fI<CURL_OPTIONS>\fP]... [\-\-dry\-run] [\-\-no\-decode\-filename] [\-o|\-O|\-\-output <PATH>] [\-\-] \fI<URL>\fP...\fR
\fBwcurl [\-\-curl\-options=\fI<CURL_OPTIONS>\fP]... [\-\-dry\-run] [\-\-no\-decode\-filename] [\-\-output=<PATH>] [\-\-] \fI<URL>\fP...\fR
\fBwcurl \-V|\-\-version\fR
\fBwcurl \-h|\-\-help\fR
.fi
.SH DESCRIPTION
\fBwcurl\fR is a simple curl wrapper which lets you use curl to download files
without having to remember any parameters.
.PP
Simply call \fBwcurl\fR with a list of URLs you want to download and \fBwcurl\fR will pick
sane defaults.
.PP
If you need anything more complex, you can provide any of curl's supported
parameters via the \fB\-\-curl\-options\fR option. Just beware that you likely
should be using curl directly if your use case is not covered.
.PP
.TP
By default, \fBwcurl\fR will:
.br
\[bu] Percent-encode whitespaces in URLs;
.br
\[bu] Download multiple URLs in parallel if the installed curl's version is >= 7.66.0;
.br
\[bu] Follow redirects;
.br
\[bu] Automatically choose a filename as output;
.br
\[bu] Avoid overwriting files if the installed curl's version is >= 7.83.0 (--no-clobber);
.br
\[bu] Perform retries;
.br
\[bu] Set the downloaded file timestamp to the value provided by the server, if available;
.br
\[bu] Default to the protocol used as https if the URL doesn't contain any;
.br
\[bu] Disable \fBcurl\fR's URL globbing parser so \fB{}\fR and \fB[]\fR characters in URLs are not treated specially;
.br
\[bu] Percent-decode the resulting filename;
.br
\[bu] Use "index.html" as default filename if there's none in the URL.
.SH OPTIONS
.TP
\fB\-\-curl\-options, \-\-curl\-options=\fI<CURL_OPTIONS>\fR...\fR
Specify extra options to be passed when invoking curl. May be specified more than once.
.TP
\fB\-o, \-O, \-\-output, \-\-output=\fI<PATH>\fR...\fR
Use the provided output path instead of getting it from the URL. If multiple
URLs are provided, all files will have the same name with a number appended to
the end (curl >= 7.83.0). If this option is provided multiple times, only the
last value is considered.
.TP
\fB\-\-dry\-run\fR
Don't actually execute curl, just print what would be invoked.
.TP
\fB\-V, \-\-version\fR
Print version information.
.TP
\fB\-h, \-\-help\fR
Print help message.
.SH CURL_OPTIONS
Any option supported by curl can be set here.
This is not used by \fBwcurl\fR; it's instead forwarded to the curl invocation.
.SH URL
Anything which is not a parameter will be considered an URL.
\fBwcurl\fR will percent-encode whitespaces and pass that to curl, which will perform the
parsing of the URL.
.SH EXAMPLES
Download a single file:
.br
\fBwcurl example.com/filename.txt\fR
.PP
Download two files in parallel:
.br
\fBwcurl example.com/filename1.txt example.com/filename2.txt\fR
.PP
Download a file passing the \fI\-\-progress\-bar\fR and \fI\-\-http2\fR flags to curl:
.br
\fBwcurl \-\-curl\-options="\-\-progress\-bar \-\-http2" example.com/filename.txt\fR
.PP
Resume from an interrupted download (if more options are used, this needs to be the last one in the list):
.br
\fBwcurl \-\-curl\-options="\-\-continue-at \-" example.com/filename.txt\fR
.SH AUTHORS
Samuel Henrique <[email protected]>
.br
Sergio Durigan Junior <[email protected]>
.br
and many contributors, see the AUTHORS file.
.SH REPORTING BUGS
If you experience any problems with \fBwcurl\fR that you do not experience with curl,
submit an issue on Github:
.br
https://github.com/curl/wcurl
.SH COPYRIGHT
\fBwcurl\fR is licensed under the curl license
.SH SEE ALSO
.BR curl (1)