mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
-i accepts URLs (stsc). For #21265.
This commit is contained in:
parent
54df044c06
commit
b28a6abfe6
3
NEWS
3
NEWS
@ -21,6 +21,9 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
||||
|
||||
** --ask-password option (and associated wgetrc command) added to
|
||||
support password prompts at the console.
|
||||
|
||||
** The --input-file option now also handles retrieving links from
|
||||
an external file.
|
||||
|
||||
* Changes in Wget 1.11.4
|
||||
|
||||
|
@ -480,9 +480,9 @@ printed.
|
||||
@cindex input-file
|
||||
@item -i @var{file}
|
||||
@itemx --input-file=@var{file}
|
||||
Read @sc{url}s from @var{file}. If @samp{-} is specified as
|
||||
@var{file}, @sc{url}s are read from the standard input. (Use
|
||||
@samp{./-} to read from a file literally named @samp{-}.)
|
||||
Read @sc{url}s from a local or external @var{file}. If @samp{-} is
|
||||
specified as @var{file}, @sc{url}s are read from the standard input.
|
||||
(Use @samp{./-} to read from a file literally named @samp{-}.)
|
||||
|
||||
If this function is used, no @sc{url}s need be present on the command
|
||||
line. If there are @sc{url}s both on the command line and in an input
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-06-28 Steven Schubiger <stsc@members.fsf.org>
|
||||
|
||||
* retr.c (retrieve_from_file): Allow for reading the links from
|
||||
an external file (HTTP/FTP).
|
||||
|
||||
2008-06-25 Steven Schubiger <stsc@members.fsf.org>
|
||||
|
||||
* ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
|
||||
|
@ -415,7 +415,7 @@ Logging and input file:\n"),
|
||||
N_("\
|
||||
-nv, --no-verbose turn off verboseness, without being quiet.\n"),
|
||||
N_("\
|
||||
-i, --input-file=FILE download URLs found in FILE.\n"),
|
||||
-i, --input-file=FILE download URLs found in local or external FILE.\n"),
|
||||
N_("\
|
||||
-F, --force-html treat input file as HTML.\n"),
|
||||
N_("\
|
||||
|
18
src/retr.c
18
src/retr.c
@ -822,10 +822,24 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
uerr_t status;
|
||||
struct urlpos *url_list, *cur_url;
|
||||
|
||||
url_list = (html ? get_urls_html (file, NULL, NULL)
|
||||
: get_urls_file (file));
|
||||
char *input_file = NULL;
|
||||
const char *url = file;
|
||||
|
||||
status = RETROK; /* Suppose everything is OK. */
|
||||
*count = 0; /* Reset the URL count. */
|
||||
|
||||
if (url_has_scheme (url))
|
||||
{
|
||||
uerr_t status;
|
||||
status = retrieve_url (url, &input_file, NULL, NULL, NULL, false);
|
||||
if (status != RETROK)
|
||||
return status;
|
||||
}
|
||||
else
|
||||
input_file = (char *) file;
|
||||
|
||||
url_list = (html ? get_urls_html (input_file, NULL, NULL)
|
||||
: get_urls_file (input_file));
|
||||
|
||||
for (cur_url = url_list; cur_url; cur_url = cur_url->next, ++*count)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user