cvs2xhtml

(Convert cvs log output to XHTML Strict)

SYNOPSIS

cvs2xhtml [-hv] -n name -s style [input]

DESCRIPTION

cvs2xhtml converts the output of the CVS log command to XHTML 1.0 Strict, suitably tagged so that it can be formatted by the application of a style sheet. The -n option should be given to tell cvs2xhtml the name of the program that the log data is for. At present, the -s flag is also effectively required, since otherwise the generated XHTML isn't valid.

The data is formatted as a description list since that was the most appropriate format for the log data that I was using this script to format (for larger and more complex packages, I use a GNU-style ChangeLog instead). This program only deals with log data from a single file.

The data is read from input, or from standard input if no input argument is given.

cvs2xhtml assumes that CVS log messages are encoded in UTF-8 and specifies a character set of UTF-8 in its XHTML output.

OPTIONS

-h, --help

Print brief usage information and exit.

-v, --version

Print the version of cvs2xhtml and exit.

-n name, --name=name

Specifies the name of the program that the log data is for, used by cvs2xhtml to create the page title and top heading.

-s style, --style=style

Specifies the style sheet to which the generated XHTML page should refer. This should be a URL (possibly relative to the location where the XHTML page will be placed), not just a file name.

EXAMPLES

Generate foo.html from the output of cvs log foo, using the style sheet pod.css:

    cvs log foo | cvs2xhtml -n foo -s pod.css > foo.html

In general, it's most convenient to pipe the output of cvs log through cvs2xhtml, although that output can also be saved to a file which can be passed to cvs2xhtml as its first argument.

BUGS

There's no way not to generate a reference to a style sheet. cvs2xhtml should also be able to figure out -n from the initial header of the CVS log output, or at least come up with a reasonable guess.

Currently, this program just throws uncaught exceptions if anything goes wrong, which is less than ideal. At least the common errors should probably be caught and result in good diagnostic output.

The XHTML generation generally isn't as robust as it could be.

NOTES

This program really isn't at all suitable for dealing with anything other than revision histories for single files. Anything more complex than that is probably better dealt with by using cvs2cl or a similar utility to generate a GNU-style ChangeLog and then turning that into XHTML.

SEE ALSO

cvs(1)

The XHTML 1.0 standard at <http://www.w3.org/TR/xhtml1/>.

Current versions of this program are available from my web tools page at <http://www.eyrie.org/~eagle/software/web/>.

AUTHOR

Russ Allbery <eagle@eyrie.org>

COPYRIGHT AND LICENSE

Copyright 2002, 2004, 2006-2008, 2021 Russ Allbery <eagle@eyrie.org>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Last spun 2022-12-12 from POD modified 2021-07-18