|
| 1 | +--- |
| 2 | +c: Copyright (C) Samuel Henrique <samueloph@debian.org>, Sergio Durigan Junior <sergiodj@debian.org> and many contributors, see the AUTHORS file. |
| 3 | +SPDX-License-Identifier: curl |
| 4 | +Title: wcurl |
| 5 | +Section: 1 |
| 6 | +Source: wcurl |
| 7 | +See-also: |
| 8 | + - curl (1) |
| 9 | + - trurl (1) |
| 10 | +Added-in: n/a |
| 11 | +--- |
| 12 | + |
| 13 | +# NAME |
| 14 | + |
| 15 | +**wcurl** - a simple wrapper around curl to easily download files. |
| 16 | + |
| 17 | +# SYNOPSIS |
| 18 | + |
| 19 | +**wcurl \<URL\>...** |
| 20 | + |
| 21 | +**wcurl [--curl-options \<CURL_OPTIONS\>]... [--dry-run] [--no-decode-filename] [-o|-O|--output \<PATH\>] [--] \<URL\>...** |
| 22 | + |
| 23 | +**wcurl [--curl-options=\<CURL_OPTIONS\>]... [--dry-run] [--no-decode-filename] [--output=\<PATH\>] [--] \<URL\>...** |
| 24 | + |
| 25 | +**wcurl -V|--version** |
| 26 | + |
| 27 | +**wcurl -h|--help** |
| 28 | + |
| 29 | +# DESCRIPTION |
| 30 | + |
| 31 | +**wcurl** is a simple curl wrapper which lets you use curl to download files |
| 32 | +without having to remember any parameters. |
| 33 | + |
| 34 | +Simply call **wcurl** with a list of URLs you want to download and **wcurl** |
| 35 | +picks sane defaults. |
| 36 | + |
| 37 | +If you need anything more complex, you can provide any of curl's supported |
| 38 | +parameters via the **--curl-options** option. Just beware that you likely |
| 39 | +should be using curl directly if your use case is not covered. |
| 40 | + |
| 41 | +By default, **wcurl** does: |
| 42 | + |
| 43 | +## * Percent-encode whitespaces in URLs; |
| 44 | + |
| 45 | +## * Download multiple URLs in parallel |
| 46 | + if the installed curl's version is \>= 7.66.0 (--parallel); |
| 47 | + |
| 48 | +## * Follow redirects; |
| 49 | + |
| 50 | +## * Automatically choose a filename as output; |
| 51 | + |
| 52 | +## * Avoid overwriting files |
| 53 | + if the installed curl's version is \>= 7.83.0 (--no-clobber); |
| 54 | + |
| 55 | +## * Perform retries; |
| 56 | + |
| 57 | +## * Set the downloaded file timestamp |
| 58 | + to the value provided by the server, if available; |
| 59 | + |
| 60 | +## * Default to https |
| 61 | + if the URL does not contain any scheme; |
| 62 | + |
| 63 | +## * Disable curl's URL globbing parser |
| 64 | + so {} and [] characters in URLs are not treated specially; |
| 65 | + |
| 66 | +## * Percent-decode the resulting filename; |
| 67 | + |
| 68 | +## * Use 'index.html' as the default filename |
| 69 | + if there is none in the URL. |
| 70 | + |
| 71 | +# OPTIONS |
| 72 | + |
| 73 | +## --curl-options, --curl-options=\<CURL_OPTIONS\>... |
| 74 | + |
| 75 | +Specify extra options to be passed when invoking curl. May be specified more |
| 76 | +than once. |
| 77 | + |
| 78 | +## -o, -O, --output, --output=\<PATH\> |
| 79 | + |
| 80 | +Use the provided output path instead of getting it from the URL. If multiple |
| 81 | +URLs are provided, resulting files share the same name with a number appended to |
| 82 | +the end (curl \>= 7.83.0). If this option is provided multiple times, only the |
| 83 | +last value is considered. |
| 84 | + |
| 85 | +## --no-decode-filename |
| 86 | + |
| 87 | +Don't percent-decode the output filename, even if the percent-encoding in the |
| 88 | +URL was done by **wcurl**, e.g.: The URL contained whitespaces. |
| 89 | + |
| 90 | +## --dry-run |
| 91 | + |
| 92 | +Do not actually execute curl, just print what would be invoked. |
| 93 | + |
| 94 | +## -V, \--version |
| 95 | + |
| 96 | +Print version information. |
| 97 | + |
| 98 | +## -h, \--help |
| 99 | + |
| 100 | +Print help message. |
| 101 | + |
| 102 | +# CURL_OPTIONS |
| 103 | + |
| 104 | +Any option supported by curl can be set here. This is not used by **wcurl**; it |
| 105 | +is instead forwarded to the curl invocation. |
| 106 | + |
| 107 | +# URL |
| 108 | + |
| 109 | +URL to be downloaded. Anything that is not a parameter is considered |
| 110 | +an URL. Whitespaces are percent-encoded and the URL is passed to curl, which |
| 111 | +then performs the parsing. May be specified more than once. |
| 112 | + |
| 113 | +# EXAMPLES |
| 114 | + |
| 115 | +Download a single file: |
| 116 | + |
| 117 | +**wcurl example.com/filename.txt** |
| 118 | + |
| 119 | +Download two files in parallel: |
| 120 | + |
| 121 | +**wcurl example.com/filename1.txt example.com/filename2.txt** |
| 122 | + |
| 123 | +Download a file passing the **--progress-bar** and **--http2** flags to curl: |
| 124 | + |
| 125 | +**wcurl --curl-options="--progress-bar --http2" example.com/filename.txt** |
| 126 | + |
| 127 | +Resume from an interrupted download (if more options are used, this needs to |
| 128 | +be
E975
the last one in the list): |
| 129 | + |
| 130 | +**wcurl --curl-options="--continue-at -" example.com/filename.txt** |
| 131 | + |
| 132 | +# AUTHORS |
| 133 | + |
| 134 | + Samuel Henrique \<samueloph@debian.org\> |
| 135 | + Sergio Durigan Junior \<sergiodj@debian.org\> |
| 136 | + and many contributors, see the AUTHORS file. |
| 137 | + |
| 138 | +# REPORTING BUGS |
| 139 | + |
| 140 | +If you experience any problems with **wcurl** that you do not experience with |
| 141 | +curl, submit an issue on Github: https://github.com/curl/wcurl |
| 142 | + |
| 143 | +# COPYRIGHT |
| 144 | + |
| 145 | +**wcurl** is licensed under the curl license |
0 commit comments