2015-03-04 23:36:33 +00:00
|
|
|
|
# Documentation HOW-TO
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
|
|
|
|
**HTML Tidy** provides several types of documentation to suit different purposes. This
|
|
|
|
|
document describes how to generate the following:
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `tidylib_api/` (directory)
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This collection of documents describes the **TidyLib** API and is generated from the
|
2015-02-13 07:13:31 +00:00
|
|
|
|
comments and code in the **Tidy** source code.
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `quickref.html`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This document provides a nice, readable HTML document describing all of the options and
|
2015-02-13 07:13:31 +00:00
|
|
|
|
settings that you can use with **Tidy** and internally in **TidyLib**.
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `tidy.1`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This document is a Mac/Linux/Unix standard `man` page.
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
## The easy way
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
In this directory you can find the shell script `build_docs.sh`, and that will build all
|
|
|
|
|
of the documentation into the `temp/` directory (i.e., `{tidy}/build/documentation/temp`).
|
|
|
|
|
|
|
|
|
|
Please note these prerequisites:
|
|
|
|
|
|
|
|
|
|
- It's a Mac/Linux/Unix shell script.
|
|
|
|
|
- Doxygen is required to generate the API documentation.
|
|
|
|
|
- xsltproc is required to generate the man page and the `quickref.html` file.
|
|
|
|
|
|
|
|
|
|
If you prefer to understand how to do this manually (for example, for integration into
|
|
|
|
|
other scripts, build systems, or IDEs), read on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Manually
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### `tidylib_api/` (directory)
|
|
|
|
|
|
|
|
|
|
If you want to build the API documentation you must have [doxygen][1] installed.
|
2015-02-13 07:13:31 +00:00
|
|
|
|
You can clone the [repository from github][2] if it is not currently installed.
|
|
|
|
|
|
|
|
|
|
Building as simple as:
|
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
~~~
|
|
|
|
|
cd {tidy}/build/documentation/
|
|
|
|
|
doxygen doxygen.cfg
|
|
|
|
|
~~~
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
This will result in a document set in `{tidy}/build/documentation/temp/tidylib_api`,
|
2015-02-13 07:13:31 +00:00
|
|
|
|
where you can find the main `index.html` file.
|
|
|
|
|
|
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
### `quickref.html`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
Note that these instructions require the standard `xsltproc` utility to build the file,
|
|
|
|
|
but any XSLT processor of your choice should work, too.
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `tidy -xml-config > "tidy-config.xml"`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
|
2015-02-13 07:13:31 +00:00
|
|
|
|
of **Tidy**’s built-in settings and their descriptions. This file is only temporary,
|
|
|
|
|
as it will be transformed in the next step.
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `xsltproc "quickref.xsl" "tidy-config.xml" > "quickref.html"`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This examples uses the `xsltproc` command to transform `tidy-config.xml` using the
|
2015-02-13 07:13:31 +00:00
|
|
|
|
rules in the `quickref.xsl` stylesheet, and output it to `quickref.html`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
### `tidy.1`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:38:16 +00:00
|
|
|
|
Note that these instructions require the standard `xsltproc` utility to build the file,
|
|
|
|
|
but any XSLT processor of your choice should work, too.
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `tidy -xml-config > "tidy-config.xml"`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
|
2015-02-13 07:13:31 +00:00
|
|
|
|
of **Tidy**’s built-in settings and their descriptions. This file is only temporary,
|
|
|
|
|
as it will be transformed in the third step.
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `tidy -xml-help > "tidy-help.xml"`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
|
2015-02-13 07:13:31 +00:00
|
|
|
|
of **Tidy**’s built-in help information. This file is only temporary,
|
|
|
|
|
as it will be transformed in the next step.
|
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- `xsltproc "tidy1.xsl" "tidy-help.xml" > "tidy.1"`
|
2015-02-13 07:13:31 +00:00
|
|
|
|
|
2015-02-14 05:50:05 +00:00
|
|
|
|
- This examples uses the `xsltproc` command to transform `tidy-help.xml` using the
|
2015-02-13 07:13:31 +00:00
|
|
|
|
rules in the `tidy1.xsl` stylesheet, and output it to `tidy.1`.
|
|
|
|
|
|
2015-03-04 23:36:33 +00:00
|
|
|
|
\note Note that `tidy1.xls` includes the file `tidy-config.xml` as part of the stylesheet,
|
2015-02-13 07:13:31 +00:00
|
|
|
|
and so although it does not appear in the command invocation, it is indeed required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[1]: http://www.stack.nl/~dimitri/doxygen/
|
2015-02-14 05:38:16 +00:00
|
|
|
|
[2]: https://github.com/doxygen/doxygen
|