diff --git a/CHANGELOG.md b/CHANGELOG.md index 23955b4..c69205e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,10 +29,10 @@ SPDX-License-Identifier: curl standardizing to curl's documentation format. ## [v2025.02.24] - * Allow `-o` and `-O` to be used without whitespaces (e.g.: `-oNAME`). + * Allow `-o` and `-O` to be used without whitespace (e.g.: `-oNAME`). * Fix capitalization of the name of copyright owner sergiodj. * Use the standard copyright header in manpage. - * Create a github workflow for tests and linting. + * Create a GitHub workflow for tests and linting. * Add missing breakline to README to fix formatting. * Update manpage to describe that `--output` can be used without the equal sign. * Add installation instructions to README. @@ -66,7 +66,7 @@ SPDX-License-Identifier: curl output files. * Add more tests. * Remove the need for GNU coreutils' `realpath` for tests. - * Update manpage with links to Github and Debian's Salsa. + * Update manpage with links to GitHub and Debian's Salsa. * Update LICENSE file with new contributors. ## [v2024-07-07] diff --git a/README.md b/README.md index f54b164..308acd7 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ 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** does: - * Percent-encode whitespaces in URLs; + * Percent-encode whitespace in URLs; * Download multiple URLs in parallel if the installed curl's version is >= 7.66.0 (`--parallel`); * Use a total number of 5 parallel connections to the same protocol + hostname + port number target if the installed curl's version is >= 8.16.0 (`--parallel-max-host`); * Follow redirects; @@ -89,7 +89,7 @@ should be using curl directly if your use case is not covered. * `--no-decode-filename` Don't percent-decode the output filename, even if the percent-encoding in the - URL was done by wcurl, e.g.: The URL contained whitespaces. + URL was done by wcurl, e.g.: The URL contained whitespace. * `--dry-run` @@ -111,7 +111,7 @@ instead forwarded to the curl invocation. # URL URL to be downloaded. Anything that is not a parameter is considered -an URL. Whitespaces are percent-encoded and the URL is passed to curl, which +an URL. Whitespace is percent-encoded and the URL is passed to curl, which then performs the parsing. May be specified more than once. # Examples diff --git a/tests/tests.sh b/tests/tests.sh index 71d6342..30ac37b 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -163,37 +163,37 @@ testUrlDefaultNameTrailingSlash() assertContains "Verify whether 'wcurl' chooses the correct default filename when there's no path in the URL and the URl ends with a slash" "${ret}" 'index.html' } -testUrlDecodingWhitespaces() +testUrlDecodingWhitespace() { url='example.com/filename%20with%20spaces' ret=$(${WCURL_CMD} ${url} 2>&1) - assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename with spaces' + assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename with spaces' } -testUrlDecodingWhitespacesTwoFiles() +testUrlDecodingWhitespaceTwoFiles() { url='example.com/filename%20with%20spaces' url_2='example.com/filename2%20with%20spaces' ret=$(${WCURL_CMD} ${url} ${url_2} 2>&1) - assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename with spaces' - assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename2 with spaces' + assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename with spaces' + assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename2 with spaces' } testUrlDecodingDisabled() { url='example.com/filename%20with%20spaces' ret=$(${WCURL_CMD} --no-decode-filename ${url} 2>&1) - assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename%20with%20spaces' + assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename%20with%20spaces' } -testUrlDecodingWhitespacesQueryString() +testUrlDecodingWhitespaceQueryString() { url='example.com/filename%20with%20spaces?query=string' ret=$(${WCURL_CMD} "${url}" 2>&1) - assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs with query strings" "${ret}" 'filename with spaces' + assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs with query strings" "${ret}" 'filename with spaces' } -testUrlDecodingWhitespacesTrailingSlash() +testUrlDecodingWhitespaceTrailingSlash() { url='example.com/filename%20with%20spaces/' ret=$(${WCURL_CMD} ${url} 2>&1) diff --git a/wcurl b/wcurl index fdbafad..66ce954 100755 --- a/wcurl +++ b/wcurl @@ -65,7 +65,7 @@ Options: multiple times, only the last value is considered. --no-decode-filename: Don't percent-decode the output filename, even if the percent-encoding in - the URL was done by wcurl, e.g.: The URL contained whitespaces. + the URL was done by wcurl, e.g.: The URL contained whitespace. --dry-run: Don't actually execute curl, just print what would be invoked. @@ -77,7 +77,7 @@ Options: instead forwarded to the curl invocation. : URL to be downloaded. Anything that is not a parameter is considered - an URL. Whitespaces are percent-encoded and the URL is passed to curl, which + an URL. Whitespace is percent-encoded and the URL is passed to curl, which then performs the parsing. May be specified more than once. _EOF_ } @@ -301,7 +301,7 @@ while [ -n "${1-}" ]; do # This is the start of the list of URLs. shift for url in "$@"; do - # Encode whitespaces into %20, since wget supports those URLs. + # Encode whitespace into %20, since wget supports those URLs. newurl=$(printf "%s\n" "${url}" | sed 's/ /%20/g') URLS="${URLS} ${newurl}" done @@ -314,7 +314,7 @@ while [ -n "${1-}" ]; do *) # This must be a URL. - # Encode whitespaces into %20, since wget supports those URLs. + # Encode whitespace into %20, since wget supports those URLs. newurl=$(printf "%s\n" "${1}" | sed 's/ /%20/g') URLS="${URLS} ${newurl}" ;; diff --git a/wcurl.md b/wcurl.md index ab5f956..7d1200b 100644 --- a/wcurl.md +++ b/wcurl.md @@ -40,7 +40,7 @@ should be using curl directly if your use case is not covered. By default, **wcurl** does: -## * Percent-encode whitespaces in URLs; +## * Percent-encode whitespace in URLs; ## * Download multiple URLs in parallel if the installed curl's version is \>= 7.66.0 (--parallel); @@ -88,7 +88,7 @@ last value is considered. ## --no-decode-filename Don't percent-decode the output filename, even if the percent-encoding in the -URL was done by **wcurl**, e.g.: The URL contained whitespaces. +URL was done by **wcurl**, e.g.: The URL contained whitespace. ## --dry-run @@ -110,7 +110,7 @@ is instead forwarded to the curl invocation. # URL URL to be downloaded. Anything that is not a parameter is considered -an URL. Whitespaces are percent-encoded and the URL is passed to curl, which +an URL. Whitespace is percent-encoded and the URL is passed to curl, which then performs the parsing. May be specified more than once. # EXAMPLES @@ -144,7 +144,7 @@ Download multiple files without a limit of concurrent connections per host (the # REPORTING BUGS If you experience any problems with **wcurl** that you do not experience with -curl, submit an issue on Github: https://github.com/curl/wcurl +curl, submit an issue on GitHub: https://github.com/curl/wcurl # COPYRIGHT