W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Re:Tidy pending items list

From: Terry Teague <teague@mailandnews.com>
Date: Wed, 3 May 2000 00:24:43 -0700
Message-Id: <l03130300b5357a2cb9f6@[]>
To: html-tidy@w3.org
Dear Dave,

Thanks for the latest release of Tidy. I looked at the pending items list
to see what I could help out with, and noticed these 2 items. Rather than
replying to you privately, I figured the list could weigh in with their
opinion if they wished.

>Vijay Patil would like tidy -h to display options sorted alphabetically.

While you are just as capable as me in copying/pasting the help text in
another order, I personally don't see the value in ordering them
alphabetically (and I assume he means the option letter, not the meaning of
the option letter, is the sort order). For example what would happen if we
had to add a new option for which we couldn't use the most logical option
letter, because that one was already being used - e.g. "-e" = "only show
errors", and a new option "-x" = "eXpand something". Would we put both
options together because their meanings start with "e", or would we put
"-e" between the "-d" and "-f" options, and the "-x" between the "-w" and
"-z" options?

I think it makes more sense to group the options in logical groupings.

If anyone takes a look at the Mac OS versions of Tidy, you will see the GUI
follows this philosophy, which also happens to match Dave's order of the
options, reasonably well. Admittedly I couldn't necessarily decide if
options should read breadthwise, or depthwise for the 2 column format I was

Currently the options seem to fall into 3 groups :

(a) Specific processing options that are independent of each other (checkboxes)
(b) Character encoding options that are mutually exclusive (radio buttons)
(c) Config/Input/Output/Error file redirection options (various types of

(If anyone wants an explanation of how the GUI options map to the command
line options in the Mac OS versions of Tidy, feel free to ask).

So given the above, the best I can suggest is to "improve" the help a
little. I'm sure someone with more experience with GNU software could
suggest appropriate changes to match the format that appears to be used by
most GNU software, particularly if there are lots of options.


    tidy_out(out, "%s: file1 file2 ...\n", prog);
    tidy_out(out, "Utility to clean up & pretty print html files\n");
    tidy_out(out, "see http://www.w3.org/People/Raggett/tidy/\n");
    tidy_out(out, "options for tidy released on %s\n", release_date);
    tidy_out(out, "\n");

    tidy_out(out, "Processing directives\n");
    tidy_out(out, "--------------------\n");
   tidy_out(out, "  -indent or -i   indent element content\n");
    tidy_out(out, "  -omit   or -o   omit optional endtags\n");
    tidy_out(out, "  -wrap 72        wrap text at column 72 (default is
    tidy_out(out, "  -upper  or -u   force tags to upper case (default is
    tidy_out(out, "  -clean  or -c   replace font, nobr & center tags by
    tidy_out(out, "  -numeric or -n  output numeric rather than named
    tidy_out(out, "  -errors or -e   only show errors\n");
    tidy_out(out, "  -quiet or -q    suppress nonessential output\n");
    tidy_out(out, "  -xml            use this when input is wellformed xml\n");
    tidy_out(out, "  -asxml          to convert html to wellformed xml\n");
    tidy_out(out, "  -slides         to burst into slides on h2 elements\n");
    tidy_out(out, "\n");

    tidy_out(out, "Character encodings\n");
    tidy_out(out, "------------------\n");
    tidy_out(out, "  -raw            leave chars > 128 unchanged upon
    tidy_out(out, "  -ascii          use ASCII for output, Latin-1 for
    tidy_out(out, "  -latin1         use Latin-1 for both input and output\n");
    tidy_out(out, "  -iso2022        use ISO2022 for both input and output\n");
    tidy_out(out, "  -utf8           use UTF-8 for both input and output\n");
    tidy_out(out, "  -mac            use the Apple MacRoman character set\n");
     tidy_out(out, "\n");

    tidy_out(out, "File manipulation\n");
    tidy_out(out, "---------------\n");
    tidy_out(out, "  -config <file>  set options from config file\n");
    tidy_out(out, "  -f <file>       write errors to named <file>\n");
    tidy_out(out, "  -modify or -m   to modify original files\n");
    tidy_out(out, "\n");

    tidy_out(out, "Miscellaneous\n");
    tidy_out(out, "------------\n");
    tidy_out(out, "  -version or -v  show version\n");
    tidy_out(out, "  -help   or -h   list command line options\n");
    tidy_out(out, "You can also use --blah for any config file option blah\n");
    tidy_out(out, "\n");

    tidy_out(out, "Input/Output default to stdin/stdout respectively\n");
    tidy_out(out, "Single letter options apart from -f may be combined\n");
    tidy_out(out, "as in:  tidy -f errs.txt -imu foo.html\n");
    tidy_out(out, "For further info on HTML see http://www.w3.org/MarkUp\n");
    tidy_out(out, "\n");

>Terry Teague says:
>                 Sorry, I should have been more clear. Part of the problem
>is the current
>                 HelpText() function in localize.c doesn't actually
>reflect current reality.
>                      You need to at least add the following line to
>HelpText() :
>                          tidy_out(out, "  -version or -v  show version\n");
>                    And I suppose it should mention the use of the new
>                                    options>" type syntax.

Actually you have implemented this in tidy30apr00, so you can take it off
your pending list.

Hope this helps. I will look at other items on the pending list.

Regards, Terry
Received on Wednesday, 3 May 2000 03:25:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:47 UTC