Daniel Stenberg, the author of the utility for transferring and retrieving data over the network curl, announced the adoption of the wcurl utility into the curl project. The wcurl utility is now recognized as an official curl project, but its development will continue under the previous maintainers in a separate repository, independently from curl. The utility is being developed by one of the Debian maintainers who oversee the curl package. In Debian Testing, Debian Unstable, and in backports for Debian 12, the wcurl utility is already included in the curl package. The wcurl code is written in Shell and is distributed under the Curl license (a variant of the MIT license).
The new utility is a wrapper around curl, implementing a simplified interface for file downloads that operates similarly to wget and relieves the user from having to remember the specific curl launch parameters (for example, many find it easier to install wget than to type 'curl -L -O -C —remote-time' every time). Unlike curl, the wcurl utility allows specifying multiple links for download at once, automatically handles redirects, and retries downloads in case of failures.
Instead of outputting to the standard stream, wcurl saves the downloaded information to files, with names chosen based on the content of the specified links or the name returned proxy server, and the modification time of the file is set to the value returned in the HTTP header Last-modified. If a file with the chosen name already exists, wcurl does not overwrite it but adds an additional digit to the name. When multiple links are specified, parallel downloads are ensured.
The utility also disables the processing of substitutions '{}' and '[]' in URLs and allows the use of spaces in links, automatically replacing them with the format '%xx'. With the option '—curl-options', the user is provided the ability to specify any curl options, and through the option '—dry-run', to determine the command string for running curl without actually performing the operation.
The announcement also mentions the trurl utility, created by the author of curl last year, which complements curl with additional capabilities for parsing and manipulating URLs. With the trurl utility, scripts can quickly perform actions such as replacing hostnames, pages, and individual parameters in links, extracting hosts and paths from links, and converting URLs into a separate representation of elements in JSON format. The trurl code is written in C and Perl and is distributed under the Curl license.
Source: opennet.ru
