From 6869050e8352d5284ac9a295a1591359dc863665 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 28 Aug 2024 23:03:47 -0400 Subject: [PATCH 1/2] README.md: Improve and fix style Signed-off-by: Sergio Durigan Junior --- README.md | 57 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 4df3608..fa3c11a 100644 --- a/README.md +++ b/README.md @@ -28,39 +28,38 @@ Simply call **wcurl** with a list of URLs you want to download and **wcurl** wil sane defaults. If you need anything more complex, you can provide any of curl's supported -parameters via the **--curl-options** option. Just beware that you likely +parameters via the `--curl-options` option. Just beware that you likely should be using curl directly if your use case is not covered. -* By default, **wcurl** will: - * Encode whitespaces in URLs; - * Download multiple URLs in parallel if the installed curl's version is >= 7.66.0; - * Follow redirects; - * Automatically choose a filename as output; - * Avoid overwriting files if the installed curl's version is >= 7.83.0 (--no-clobber); - * Perform retries; - * Set the downloaded file timestamp to the value provided by the server, if available; - * Disable **curl**'s URL globbing parser so **{}** and **\[\]** characters in URLs are not treated specially. +* By default, **wcurl** will: + * Encode whitespaces in URLs; + * Download multiple URLs in parallel if the installed curl's version is >= 7.66.0; + * Follow redirects; + * Automatically choose a filename as output; + * Avoid overwriting files if the installed curl's version is >= 7.83.0 (`--no-clobber`); + * Perform retries; + * Set the downloaded file timestamp to the value provided by the server, if available; + * Disable **curl**'s URL globbing parser so `{}` and `[]` characters in URLs are not treated specially. # Options -* **--curl-options, curl-options=<CURL\_OPTIONS>**... +* `--curl-options, curl-options=`... + Specify extra options to be passed when invoking curl. May be specified more than once. -* **--dry-run** +* `--dry-run` + Don't actually execute curl, just print what would be invoked. -* **-V, --version** - Print version information. +* `-V, --version` -* **-h, --help** - Print help message. + Print version information. -# Curl_options +* `-h, --help` -Any option supported by curl can be set here. -This is not used by **wcurl**; it's instead forwarded to the curl invocation. + Print help message. # Url @@ -70,17 +69,21 @@ parsing of the URL. # Examples -Download a single file: -**wcurl example.com/filename.txt** +* Download a single file: + + `wcurl example.com/filename.txt` + +* Download two files in parallel: + + `wcurl example.com/filename1.txt example.com/filename2.txt` + +* Download a file passing the _--progress-bar_ and _--http2_ flags to curl: -Download two files in parallel: -**wcurl example.com/filename1.txt example.com/filename2.txt** + `wcurl --curl-options="--progress-bar --http2" example.com/filename.txt` -Download a file passing the _--progress-bar_ and _--http2_ flags to curl: -**wcurl --curl-options="--progress-bar --http2" example.com/filename.txt** +* Resume from an interrupted download (if more options are used, this needs to be the last one in the list): -Resume from an interrupted download (if more options are used, this needs to be the last one in the list): -**wcurl --curl-options="--continue-at -" example.com/filename.txt** + `wcurl --curl-options="--continue-at -" example.com/filename.txt` # Authors From 6e9f5a46d45f9a251eeb3a9c3e8de675535c7afa Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 28 Aug 2024 23:09:05 -0400 Subject: [PATCH 2/2] README.md: Brief section explaining about our testsuite This should help with issues like #22. Signed-off-by: Sergio Durigan Junior --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index fa3c11a..dffc596 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,19 @@ parsing of the URL. `wcurl --curl-options="--continue-at -" example.com/filename.txt` +# Running the testsuite + +If you would like to run the tests, you will first need to install the +`shunit2` package. On Debian-like and Fedora-like systems, the +package is called `shunit2`. + +After that, you can run the testsuite by simply invoking the test +script: + +```sh +./tests/tests.sh +``` + # Authors Samuel Henrique <[samueloph@debian.org](mailto:samueloph@debian.org)>