]> sjero.net Git - wget/commitdiff
Rename --html-extension to --adjust-extension.
authorMicah Cowan <micah@cowan.name>
Wed, 29 Jul 2009 00:37:58 +0000 (17:37 -0700)
committerMicah Cowan <micah@cowan.name>
Wed, 29 Jul 2009 00:37:58 +0000 (17:37 -0700)
ChangeLog
NEWS
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/convert.c
src/http.c
src/init.c
src/main.c
src/options.h

index 1eeb63cac8977b60678232eb5c8c7a95b014467d..3c5caec923a3769205ec073df67bc744d3dde2a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 2009-07-28  Micah Cowan  <micah@cowan.name>
 
 2009-07-28  Micah Cowan  <micah@cowan.name>
 
-       * NEWS: Mention some more previously undocumented items, and the
-       new "ascii" specifer for --restrict-file-names.
+       * NEWS: Mention some more previously undocumented items, the
+       new "ascii" specifer for --restrict-file-names, and the renaming
+       of --html-extension to --adjust-extension.
 
 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
 
 
 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
 
diff --git a/NEWS b/NEWS
index df2c7742bd3881e606b98c8f3f7221ba2726bbec..559558e741397b0e4f01bf901f3fe792aeda7553 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,9 @@ an external file.
 information on how it was built, and the set of configure-time options
 that were selected.
 
 information on how it was built, and the set of configure-time options
 that were selected.
 
+** --html-extension has been renamed to --adjust-extension, to reflect
+the fact that it now also applies to CSS content..
+
 ** An "ascii" specifier is now accepted by --restrict-file-names, which
 forces the percent-encoding of all non-ASCII bytes
 
 ** An "ascii" specifier is now accepted by --restrict-file-names, which
 forces the percent-encoding of all non-ASCII bytes
 
index d5494fa2f59b812f928739089723fb65d266e3cb..21cd03fd0b778ae15389160fa8a13a39ea6e3362 100644 (file)
@@ -2,6 +2,8 @@
 
        * wget.texi (Download Options): Document "lowercase", "uppercase",
        and the new "ascii" specifier for --restrict-file-names.
 
        * wget.texi (Download Options): Document "lowercase", "uppercase",
        and the new "ascii" specifier for --restrict-file-names.
+       (HTTP Options): Rename --html-extension to --adjust-extension.
+       (Wgetrc Commands): Rename html_extension to adjust_extension.
 
 2009-07-26  Micah Cowan  <micah@cowan.name>
 
 
 2009-07-26  Micah Cowan  <micah@cowan.name>
 
index aab1a8907df9cd7bbb1fa49e2077594774c486ce..ee7a873cee0b493b19d536516a3e189c99efdf92 100644 (file)
@@ -1148,8 +1148,9 @@ Use @var{name} as the default file name when it isn't known (i.e., for
 URLs that end in a slash), instead of @file{index.html}.
 
 @cindex .html extension
 URLs that end in a slash), instead of @file{index.html}.
 
 @cindex .html extension
+@cindex .css extension
 @item -E
 @item -E
-@itemx --html-extension
+@itemx --adjust-extension
 If a file of type @samp{application/xhtml+xml} or @samp{text/html} is 
 downloaded and the URL does not end with the regexp 
 @samp{\.[Hh][Tt][Mm][Ll]?}, this option will cause the suffix @samp{.html} 
 If a file of type @samp{application/xhtml+xml} or @samp{text/html} is 
 downloaded and the URL does not end with the regexp 
 @samp{\.[Hh][Tt][Mm][Ll]?}, this option will cause the suffix @samp{.html} 
@@ -1170,9 +1171,14 @@ version of the file will be saved as @file{@var{X}.orig} (@pxref{Recursive
 Retrieval Options}).
 
 As of version 1.12, Wget will also ensure that any downloaded files of
 Retrieval Options}).
 
 As of version 1.12, Wget will also ensure that any downloaded files of
-type @samp{text/css} end in the suffix @samp{.css}. Obviously, this
-makes the name @samp{--html-extension} misleading; a better name is
-expected to be offered as an alternative in the near future.
+type @samp{text/css} end in the suffix @samp{.css}, and the option was
+renamed from @samp{--html-extension}, to better reflect its new
+behavior. The old option name is still acceptable, but should now be
+considered deprecated.
+
+At some point in the future, this option may well be expanded to
+include suffixes for other types of content, including content types
+that are not parsed by Wget.
 
 @cindex http user
 @cindex http password
 
 @cindex http user
 @cindex http password
@@ -2264,7 +2270,7 @@ ways, all of which can change whether an accept/reject rule matches:
 If the local file already exists and @samp{--no-directories} was
 specified, a numeric suffix will be appended to the original name.
 @item
 If the local file already exists and @samp{--no-directories} was
 specified, a numeric suffix will be appended to the original name.
 @item
-If @samp{--html-extension} was specified, the local filename will have
+If @samp{--adjust-extension} was specified, the local filename might have
 @samp{.html} appended to it. If Wget is invoked with @samp{-E -A.php},
 a filename such as @samp{index.php} will match be accepted, but upon
 download will be named @samp{index.php.html}, which no longer matches,
 @samp{.html} appended to it. If Wget is invoked with @samp{-E -A.php},
 a filename such as @samp{index.php} will match be accepted, but upon
 download will be named @samp{index.php.html}, which no longer matches,
@@ -2845,10 +2851,12 @@ Turn globbing on/off---the same as @samp{--glob} and @samp{--no-glob}.
 Define a header for HTTP downloads, like using
 @samp{--header=@var{string}}.
 
 Define a header for HTTP downloads, like using
 @samp{--header=@var{string}}.
 
-@item html_extension = on/off
+@item adjust_extension = on/off
 Add a @samp{.html} extension to @samp{text/html} or
 Add a @samp{.html} extension to @samp{text/html} or
-@samp{application/xhtml+xml} files without it, or a @samp{.css}
-extension to @samp{text/css} files without it, like @samp{-E}.
+@samp{application/xhtml+xml} files that lack one, or a @samp{.css}
+extension to @samp{text/css} files that lack one, like
+@samp{-E}. Previously named @samp{html_extension} (still acceptable,
+but deprecated).
 
 @item http_keep_alive = on/off
 Turn the keep-alive feature on or off (defaults to on).  Turning it
 
 @item http_keep_alive = on/off
 Turn the keep-alive feature on or off (defaults to on).  Turning it
index afac4339986cc9bc34e6b6042133d3af1d4e77c9..f53b6d49d25d926ca0ca2910e5f27856743f3563 100644 (file)
@@ -1,3 +1,18 @@
+2009-07-28  Micah Cowan  <micah@cowan.name>
+
+       * main.c (option_data): Rename --html-extension to
+       --adjust-extension.
+       (print_help): Ditto.
+       
+       * options.h (struct option): Rename html_extension to
+       adjust_extension.
+       * http.c (gethttp): Ditto.
+       * convert.c (local_quote_string): Ditto.
+
+       * init.c (commands): Add "adjustextension", and reflect rename
+       change for opt.adjust_extension, for both "adjustextension" and
+       "htmlextension".
+
 2009-07-27  Micah Cowan  <micah@cowan.name>
 
        * options.h (struct options): Added restrict_files_nonascii
 2009-07-27  Micah Cowan  <micah@cowan.name>
 
        * options.h (struct options): Added restrict_files_nonascii
index 280d1b0c819f4bd6c5833a8c30d48acaeffd89e6..71e3d8f03a4346a96565152158d55a43c4f18951 100644 (file)
@@ -591,7 +591,7 @@ find_fragment (const char *beg, int size, const char **bp, const char **ep)
 
    We quote ? as %3F to avoid passing part of the file name as the
    parameter when browsing the converted file through HTTP.  However,
 
    We quote ? as %3F to avoid passing part of the file name as the
    parameter when browsing the converted file through HTTP.  However,
-   it is safe to do this only when `--html-extension' is turned on.
+   it is safe to do this only when `--adjust-extension' is turned on.
    This is because converting "index.html?foo=bar" to
    "index.html%3Ffoo=bar" would break local browsing, as the latter
    isn't even recognized as an HTML file!  However, converting
    This is because converting "index.html?foo=bar" to
    "index.html%3Ffoo=bar" would break local browsing, as the latter
    isn't even recognized as an HTML file!  However, converting
@@ -628,7 +628,7 @@ local_quote_string (const char *file)
         *to++ = '3';
         break;
       case '?':
         *to++ = '3';
         break;
       case '?':
-        if (opt.html_extension)
+        if (opt.adjust_extension)
           {
             *to++ = '%';
             *to++ = '3';
           {
             *to++ = '%';
             *to++ = '3';
index 311cb97289537c3bf10e3435f69a536acf88bb16..d24db5fc38f3393ef6937c32e1ba03e3e6eba24b 100644 (file)
@@ -2175,10 +2175,10 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
   else
     *dt &= ~TEXTCSS;
 
   else
     *dt &= ~TEXTCSS;
 
-  if (opt.html_extension)
+  if (opt.adjust_extension)
     {
       if (*dt & TEXTHTML)
     {
       if (*dt & TEXTHTML)
-        /* -E / --html-extension / html_extension = on was specified,
+        /* -E / --adjust-extension / adjust_extension = on was specified,
            and this is a text/html file.  If some case-insensitive
            variation on ".htm[l]" isn't already the file's suffix,
            tack on ".html". */
            and this is a text/html file.  If some case-insensitive
            variation on ".htm[l]" isn't already the file's suffix,
            tack on ".html". */
index 5a4bbe50438351ed5683166eba48261f50369f69..4e16d1fee3d79b0e42da3bae08e074ca067af983 100644 (file)
@@ -107,6 +107,7 @@ static const struct {
   /* KEEP THIS LIST ALPHABETICALLY SORTED */
   { "accept",           &opt.accepts,           cmd_vector },
   { "addhostdir",       &opt.add_hostdir,       cmd_boolean },
   /* KEEP THIS LIST ALPHABETICALLY SORTED */
   { "accept",           &opt.accepts,           cmd_vector },
   { "addhostdir",       &opt.add_hostdir,       cmd_boolean },
+  { "adjustextension",  &opt.adjust_extension,  cmd_boolean },
   { "alwaysrest",       &opt.always_rest,       cmd_boolean }, /* deprecated */
   { "askpassword",      &opt.ask_passwd,        cmd_boolean },
   { "authnochallenge",  &opt.auth_without_challenge,
   { "alwaysrest",       &opt.always_rest,       cmd_boolean }, /* deprecated */
   { "askpassword",      &opt.ask_passwd,        cmd_boolean },
   { "authnochallenge",  &opt.auth_without_challenge,
@@ -163,7 +164,7 @@ static const struct {
   { "ftpuser",          &opt.ftp_user,          cmd_string },
   { "glob",             &opt.ftp_glob,          cmd_boolean },
   { "header",           NULL,                   cmd_spec_header },
   { "ftpuser",          &opt.ftp_user,          cmd_string },
   { "glob",             &opt.ftp_glob,          cmd_boolean },
   { "header",           NULL,                   cmd_spec_header },
-  { "htmlextension",    &opt.html_extension,    cmd_boolean },
+  { "htmlextension",    &opt.adjust_extension,  cmd_boolean },
   { "htmlify",          NULL,                   cmd_spec_htmlify },
   { "httpkeepalive",    &opt.http_keep_alive,   cmd_boolean },
   { "httppasswd",       &opt.http_passwd,       cmd_string }, /* deprecated */
   { "htmlify",          NULL,                   cmd_spec_htmlify },
   { "httpkeepalive",    &opt.http_keep_alive,   cmd_boolean },
   { "httppasswd",       &opt.http_passwd,       cmd_string }, /* deprecated */
index 4616b0639b5600afbc07f7147cc54a6aa7161771..5c0b3315013189970e178752c35ffc4c4933dfbc 100644 (file)
@@ -147,6 +147,7 @@ struct cmdline_option {
 static struct cmdline_option option_data[] =
   {
     { "accept", 'A', OPT_VALUE, "accept", -1 },
 static struct cmdline_option option_data[] =
   {
     { "accept", 'A', OPT_VALUE, "accept", -1 },
+    { "adjust-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 },
     { "append-output", 'a', OPT__APPEND_OUTPUT, NULL, required_argument },
     { "ask-password", 0, OPT_BOOLEAN, "askpassword", -1 },
     { "auth-no-challenge", 0, OPT_BOOLEAN, "authnochallenge", -1 },
     { "append-output", 'a', OPT__APPEND_OUTPUT, NULL, required_argument },
     { "ask-password", 0, OPT_BOOLEAN, "askpassword", -1 },
     { "auth-no-challenge", 0, OPT_BOOLEAN, "authnochallenge", -1 },
@@ -195,7 +196,7 @@ static struct cmdline_option option_data[] =
     { "header", 0, OPT_VALUE, "header", -1 },
     { "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
     { "host-directories", 0, OPT_BOOLEAN, "addhostdir", -1 },
     { "header", 0, OPT_VALUE, "header", -1 },
     { "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
     { "host-directories", 0, OPT_BOOLEAN, "addhostdir", -1 },
-    { "html-extension", 'E', OPT_BOOLEAN, "htmlextension", -1 },
+    { "html-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 },
     { "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 },
     { "http-keep-alive", 0, OPT_BOOLEAN, "httpkeepalive", -1 },
     { "http-passwd", 0, OPT_VALUE, "httppassword", -1 }, /* deprecated */
     { "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 },
     { "http-keep-alive", 0, OPT_BOOLEAN, "httpkeepalive", -1 },
     { "http-passwd", 0, OPT_VALUE, "httppassword", -1 }, /* deprecated */
@@ -537,7 +538,7 @@ HTTP options:\n"),
        --default-page=NAME     Change the default page name (normally\n\
                                this is `index.html'.).\n"),
     N_("\
        --default-page=NAME     Change the default page name (normally\n\
                                this is `index.html'.).\n"),
     N_("\
-  -E,  --html-extension        save HTML documents with `.html' extension.\n"),
+  -E,  --adjust-extension      save HTML/CSS documents with proper extensions.\n"),
     N_("\
        --ignore-length         ignore `Content-Length' header field.\n"),
     N_("\
     N_("\
        --ignore-length         ignore `Content-Length' header field.\n"),
     N_("\
index cc0d20e635094253cff5072446072ec1f3ff799e..8afa2523441f2f677d348786c7736e0d105fc0c9 100644 (file)
@@ -162,7 +162,7 @@ struct options
   bool delete_after;           /* Whether the files will be deleted
                                   after download. */
 
   bool delete_after;           /* Whether the files will be deleted
                                   after download. */
 
-  bool html_extension;         /* Use ".html" extension on all text/html? */
+  bool adjust_extension;               /* Use ".html" extension on all text/html? */
 
   bool page_requisites;                /* Whether we need to download all files
                                   necessary to display a page properly. */
 
   bool page_requisites;                /* Whether we need to download all files
                                   necessary to display a page properly. */