From 7565be0ceb50e4b67769f03eae1a5b630a4edff0 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 18:21:26 +0000 Subject: [PATCH 01/20] TidyLib = tidylib in the docs --- build/documentation/doxygen.cfg | 6 +++--- build/documentation/tidy_docs.dox | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index f4f5248..781f1df 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -120,7 +120,7 @@ ALWAYS_DETAILED_SEC = YES # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. -INLINE_INHERITED_MEMB = NO +INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set @@ -1265,7 +1265,7 @@ MATHJAX_CODEFILE = # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. -SEARCHENGINE = NO +SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client @@ -1609,7 +1609,7 @@ SEARCH_INCLUDES = NO # contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = "../../src" # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox index 92b7633..cd94cd0 100644 --- a/build/documentation/tidy_docs.dox +++ b/build/documentation/tidy_docs.dox @@ -17,7 +17,7 @@ \section content Contents - \ref tidy5_cmd -- \ref tidy5_lib +- \ref tidylib - \ref building_tidy - \ref history @@ -30,7 +30,7 @@ \htmlinclude tidy5.cmd.txt -\page TidyLib TidyLib +\page tidylib tidylib - \b TidyLib - is easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. From e5f029cda60314510966d0c1a71907c3a400c439 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 18:27:23 +0000 Subject: [PATCH 02/20] create examples directory for doxygen --- build/documentation/doxygen.cfg | 4 ++-- build/documentation/{ => examples}/example.1.c | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename build/documentation/{ => examples}/example.1.c (100%) diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index 781f1df..08f6cca 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -355,7 +355,7 @@ EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. -EXTRACT_PRIVATE = YES +EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or # internal scope will be included in the documentation. @@ -724,7 +724,7 @@ EXCLUDE_SYMBOLS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = "./" +EXAMPLE_PATH = "./examples/" # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff --git a/build/documentation/example.1.c b/build/documentation/examples/example.1.c similarity index 100% rename from build/documentation/example.1.c rename to build/documentation/examples/example.1.c From f15bcf8808ad10ef982d8f379f6ced176e334910 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 20:22:32 +0000 Subject: [PATCH 03/20] Set correct tify5 path in build_docs, include License and tweaks --- build/documentation/.gitignore | 10 ++++++++++ build/documentation/build_docs.sh | 7 +++++-- build/documentation/tidy_docs.dox | 9 ++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 build/documentation/.gitignore diff --git a/build/documentation/.gitignore b/build/documentation/.gitignore new file mode 100644 index 0000000..ea87efb --- /dev/null +++ b/build/documentation/.gitignore @@ -0,0 +1,10 @@ + +# file created during build_docs +# = tidy5 -h > tidy5.cmd.txt +examples/tidy5.cmd.txt + +# The license file needs to copies to examples for \include +examples/LICENSE.md + + + diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index 9c96961..808615b 100755 --- a/build/documentation/build_docs.sh +++ b/build/documentation/build_docs.sh @@ -7,7 +7,7 @@ # documentation. Relative path is okay. You shouldn't have to change this # too often if your compiler always puts tidy in the same place. -TIDY_PATH="./tidy5" # Current directory. +TIDY_PATH="../cmake/tidy5" # Current directory. TIDY_VERSION=`cat ../../version.txt` @@ -108,7 +108,10 @@ if [ "$BUILD_API" -eq 1 ]; then echo "The following is doxygen's stderr output. It doesn't indicate errors with this script:\n" # echo the output of tidy5 --help so we can include - $TIDY_PATH -h > "./tidy5.cmd.txt" + $TIDY_PATH -h > "./examples/tidy5.cmd.txt" + + ## copy license file to examples for includsing + cp ../../LICENSE.md ./examples/ ## this lot # - echos and catches outputs the doxygen config diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox index cd94cd0..69f107e 100644 --- a/build/documentation/tidy_docs.dox +++ b/build/documentation/tidy_docs.dox @@ -20,7 +20,7 @@ - \ref tidylib - \ref building_tidy - \ref history - +- \ref license @@ -162,4 +162,11 @@ being developed and prepped for a new, stable, and modern release.

HTACG is also working diligently with the SourceForge maintainers in an effort to harmonize HTML Tidy into a single, stable, solid release once again.

+ +\page license License + +
+\htmlinclude LICENSE.md
+
+ */ \ No newline at end of file From 895411023216905525a35bdd6fb819d07658cc8a Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 20:35:51 +0000 Subject: [PATCH 04/20] add link to modules and fix tidy5 example --- build/documentation/DoxygenLayout.xml | 1 + build/documentation/build_docs.sh | 2 +- build/documentation/tidy_docs.dox | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build/documentation/DoxygenLayout.xml b/build/documentation/DoxygenLayout.xml index a90dcf7..9deb824 100644 --- a/build/documentation/DoxygenLayout.xml +++ b/build/documentation/DoxygenLayout.xml @@ -21,6 +21,7 @@ + diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index 808615b..bdf038a 100755 --- a/build/documentation/build_docs.sh +++ b/build/documentation/build_docs.sh @@ -119,7 +119,7 @@ if [ "$BUILD_API" -eq 1 ]; then # - which are then passed to doxygen as stdin (instead of the path to a config.file) ( cat "$DOXY_CFG"; \ echo "PROJECT_NUMBER=$TIDY_VERSION"; \ - echo "HTML_EXTRA_FILES=$OUTP_DIR/quickref.html ./tidy5.cmd.txt"; ) \ + echo "HTML_EXTRA_FILES=$OUTP_DIR/quickref.html ./examples/tidy5.cmd.txt"; ) \ | doxygen - > /dev/null echo "\nTidyLib API documentation has been built." else diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox index 69f107e..cdaed30 100644 --- a/build/documentation/tidy_docs.dox +++ b/build/documentation/tidy_docs.dox @@ -6,18 +6,20 @@

What is tidy ?

-- \b `tidy` - - is a console application for Mac OS X, Linux, Windows, UNIX, and more. - - It corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards. -- \b `tidylib` +- \ref tidylib - is a C static or dynamic library that developers can integrate into their applications in order to bring all of Tidy’s power to your favorite tools. - `tidylib` is used today in desktop applications, web servers, and more. + +- \ref tidy5_cmd + - is a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. + - It corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards. \section content Contents - \ref tidy5_cmd - \ref tidylib + - Modules - \ref building_tidy - \ref history - \ref license From 616cafb2e4c67103e65214aeebd66420c47607e8 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 21:01:49 +0000 Subject: [PATCH 05/20] add some style to make it more readable --- build/documentation/doxygen.cfg | 2 +- build/documentation/style.css | 182 ++++++++++++++++++++++++++++++ build/documentation/tidy_docs.dox | 1 + 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 build/documentation/style.css diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index 08f6cca..25fd7e4 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -953,7 +953,7 @@ HTML_STYLESHEET = # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = ./style.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note diff --git a/build/documentation/style.css b/build/documentation/style.css new file mode 100644 index 0000000..02fe8a0 --- /dev/null +++ b/build/documentation/style.css @@ -0,0 +1,182 @@ + +body { + background-color: #efefef; +} + +#projectname { + font-family: sans-serif; + font-size: 22pt; + margin: 0 0 0 0; + padding: 2px 0px; + color: #333333; + text-shadow: 3px 3px 1px #cccccc; +} + +#projectnumber { + font-size: 12pt; +} + +#projectbrief { + font-family: sans-serif; + font-size: 10pt; + color: #666666; +} + + +.contents h1 { + font-size: 15pt; + font-family: monospace; + color: #4D4D74; + font-weight: bold; + border-left: none; + border-top: none; + border-bottom: 2px solid #cccccc; + margin: 30px 0px 10px 0px; + padding: 5px 0 5px 10px; +} +.contents h2 { + font-size: 12pt; + font-family: monospace; + color: #4D4D74; + font-weight: bold; + border-top: none; + border-bottom: 1px solid #dddddd; + margin: 20px 20% 20px 0px; + padding: 2px 0 2px 10px; +} + + + +.contents p { + line-height: 130%; + font-size: 11pt; + font-family: sans-serif; + margin: 10px 20% 15px 10px; + padding: 0px; +} + +.contents ul{ + list-style-type: disc; + font-size: 11pt; + margin: 5px 20% 5px 40px; + padding: 0px; + line-height: 140%; +} +.contents ul ul{ + list-style-type: circle; + margin-left: 30px; +} +.contents li{ + padding: 2px 0 2px 0; + margin: 0; + ssbackground-color: pink; +} + +.contents .textblock{ + font-size: 10pt; + margin: 10px 50px 10px 50px; + line-height: 140%; +} +.contents .textblock code{ + font-family: monospace; + font-size: 9pt; +} +.contents .todo{ + font-size: 11pt; + margin: 10px 10% 20px 30px; +} +.contents .bug{ + font-size: 11pt; + margin: 10px 10% 20px 30px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin: 5px 10% 5px 30px; + padding: 10px; + border-left: 4px solid; + border-color: #D0C000; + background-color: #FFFAC5; + border-radius: 10px; +} + +ul dl.note{ + margin-right: 0; +} + +dl.warning, dl.attention +{ + margin: 5px 10% 5px 30px; + padding: 10px; + border-left: 4px solid; + border-color: #FF909F; + background-color: #FFE1E5; + border-radius: 10px; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin: 5px 10% 5px 30px; + padding: 10px; + border-left:4px solid #B10BBF; + background-color: #FBC9FF; + border-radius: 10px; +} + +dl.todo +{ + margin: 5px 10% 5px 30px; + padding: 10px; + border-left:4px solid #00C0E0; + background-color: #DCFAFF ; + border-radius: 10px; +} +dl.bug +{ + margin: 5px 10% 5px 30px; + padding: 10px; + border-left:4px solid red; + background-color: #FFC3B9 ; + border-radius: 10px; +} +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + + + +dl.section dd { + margin-bottom: 6px; +} \ No newline at end of file diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox index cdaed30..5e62371 100644 --- a/build/documentation/tidy_docs.dox +++ b/build/documentation/tidy_docs.dox @@ -20,6 +20,7 @@ - \ref tidy5_cmd - \ref tidylib - Modules + - \ref todo - \ref building_tidy - \ref history - \ref license From 2b05e9fdd7d1c2e9d12f04717a1a7e3071832707 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 22:48:00 +0000 Subject: [PATCH 06/20] Add TODO list --- build/documentation/tidy_docs.dox | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox index 5e62371..4347e6d 100644 --- a/build/documentation/tidy_docs.dox +++ b/build/documentation/tidy_docs.dox @@ -33,6 +33,10 @@ \htmlinclude tidy5.cmd.txt +\page todo Todo List + +\xrefitem "Todo" "Todo List" + \page tidylib tidylib - \b TidyLib - is easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. @@ -45,6 +49,7 @@ - \b TidyLib - uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface. + \section example_hello Example \include example.1.c From 93bbd948eef5b62cf595746b482566247ff204b5 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 23:28:52 +0000 Subject: [PATCH 07/20] Split up pages into seperate files for easier nav, added description to home and a configuration page --- build/documentation/doxygen.cfg | 2 +- .../documentation/examples/example_config.txt | 22 +++ build/documentation/pages/main_page.dox | 51 +++++ build/documentation/pages/page_building.dox | 91 +++++++++ build/documentation/pages/page_history.dox | 35 ++++ build/documentation/pages/page_license.dox | 11 ++ build/documentation/pages/page_tidy.dox | 12 ++ .../documentation/pages/page_tidy_config.dox | 39 ++++ build/documentation/pages/page_tidylib.dox | 24 +++ build/documentation/pages/page_todo.dox | 10 + build/documentation/tidy_docs.dox | 180 ------------------ 11 files changed, 296 insertions(+), 181 deletions(-) create mode 100644 build/documentation/examples/example_config.txt create mode 100644 build/documentation/pages/main_page.dox create mode 100644 build/documentation/pages/page_building.dox create mode 100644 build/documentation/pages/page_history.dox create mode 100644 build/documentation/pages/page_license.dox create mode 100644 build/documentation/pages/page_tidy.dox create mode 100644 build/documentation/pages/page_tidy_config.dox create mode 100644 build/documentation/pages/page_tidylib.dox create mode 100644 build/documentation/pages/page_todo.dox delete mode 100644 build/documentation/tidy_docs.dox diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index 25fd7e4..0f041cc 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -665,7 +665,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = "../../include" "./" +INPUT = "../../include" "./" "./pages" # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/build/documentation/examples/example_config.txt b/build/documentation/examples/example_config.txt new file mode 100644 index 0000000..5a0164b --- /dev/null +++ b/build/documentation/examples/example_config.txt @@ -0,0 +1,22 @@ +// sample config file for HTML tidy +indent: auto +indent-spaces: 2 +wrap: 72 +markup: yes +output-xml: no +input-xml: no +show-warnings: yes +numeric-entities: yes +quote-marks: yes +quote-nbsp: yes +quote-ampersand: no +break-before-br: no +uppercase-tags: no +uppercase-attributes: no +char-encoding: latin1 +new-inline-tags: cfif, cfelse, math, mroot, + mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover, + munder, mover, mmultiscripts, msup, msub, mtext, + mprescripts, mtable, mtr, mtd, mth +new-blocklevel-tags: cfoutput, cfquery +new-empty-tags: cfelse \ No newline at end of file diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox new file mode 100644 index 0000000..8b88546 --- /dev/null +++ b/build/documentation/pages/main_page.dox @@ -0,0 +1,51 @@ +/*! + +\mainpage Tidy home + +\note The repository github.com/htacg/tidy-html5 and this documentation should be considered canonical for HTML Tidy as of 2015-January-15. + + +\b Tidy corrects and cleans up HTML content by fixing markup errors such as mismatched, misnested and missing tags, missing end "/" tags, missing quotations et all, eg: + + +\code{.html} +


heading

+

sub
heading

+References +\endcode +is converted to +\code{.html} +
+

heading

+

sub

+
+

heading

+
References +\endcode + + +

tidy and this project has two parts

+ +- \ref tidylib + - is a C static or dynamic library that developers can integrate into their applications + in order to bring all of Tidy’s power to your favorite tools. + +- \ref tidy5_cmd + - is a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. + +\section content Contents + +- \ref tidy5_cmd + - \ref tidy_config +- \ref tidylib + - Modules +- \ref building_tidy +- \ref history +- \ref license +- \ref todo + + + + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_building.dox b/build/documentation/pages/page_building.dox new file mode 100644 index 0000000..d2202c5 --- /dev/null +++ b/build/documentation/pages/page_building.dox @@ -0,0 +1,91 @@ +/*! + + +\page building_tidy Building Tidy + +\section Prerequisites + + - \b git - git-scm.com/book/en/v2/Getting-Started-Installing-Git + - \b cmake - cmake.org/download/ + - Appropriate build tools for the platform + +CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build +commands below are only for the command line use. + +Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate +variuous 'native' build files. Running cmake without any parameters will list the generators +available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools +make installed, but many other generators are supported. + +In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the +tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there. + +\section get_source Get the source code + +Tidy’s sourcecode can be found at github.com/htacg/tidy-html5. There are sometimes +several branches, but in general `master` is the most recently updated version. + +\note Note that as “cutting edge,” it may have bugs or other +unstable behavior. If you prefer a stable, officially released version, be sure to have a look +at Releases on the github page. + +In general you can use the Download ZIP button on the github page to download the most recent version of a branch. If you prefer +Git then you can clone the repository to a working machine with: + + +\code{.sh} +git clone git@github.com:htacg/tidy-html5.git +\endcode + +\section compile Compile + +

Enter the `build/cmake` directory

+\code{.sh} +# *nix +cd {your-tidy-html5-directory}/build/cmake + +# windows +cd {your-tidy-html5-directory}\build\cmake +\endcode + +

Configure the build

+\code{.sh} +# *nix +cmake ../../ [-DCMAKE_INSTALL_PREFIX=/path/for/install] + +# windows +cmake ..\..\ +\endcode +By default cmake sets the install path to `/usr/local` in unix. + +If you wanted the binary in say `/usr/bin` instead, then use `-DCMAKE_INSTALL_PREFIX=/usr` + +On windows the default install is to `C:\Program Files\tidy5`, or `C:/Program Files (x86)/tidy5`, which is not very useful. After +the build the `tidy[n].exe` is in the `Release\` directory, and can be copied to any directory in your `PATH` environment variable, for global use. + +If you need the tidy library built as a 'shared' (DLL) library, then in add the command `-DBUILD_SHARED_LIB:BOOL=ON`. +This option is `OFF` by default, so the static library is built and linked with the command line tool for convenience. + + +

Compile

+\code{.sh} +# *nix +make + +# windows +cmake --build . --config Release +\endcode + +

Install

+\code{.sh} +# *nix +[sudo] make install + +# windows +cmake --build . --config Release --target INSTALL +\endcode + + + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_history.dox b/build/documentation/pages/page_history.dox new file mode 100644 index 0000000..22ee95c --- /dev/null +++ b/build/documentation/pages/page_history.dox @@ -0,0 +1,35 @@ +/*! + + +\page history History + +- This repository originally transferred from w3c.github.com/tidy-html5. + +- First moved to Github from tidy.sourceforge.net + + +

HTML Tidy was created by the W3C’s own Dave Raggett back in the +dawn of the Internet age. His original Internet page is still available and +gives a sense of the early history: Clean up your Web pages with HTML TIDY.

+ +

Satisfied with his work Dave passed the torch to a dedicated group of +maintainers at tidy.sourceforge.net where the important tasks of turning +Tidy into a C library and keeping up with developing standards was +performed.

+ +

W3C members took a renewed interest in Tidy in 2011 and forked the +project to github (now redirects to new maintainers), where it featured +compatibility with HTML5 via a key contribution from one of the SourceForge +key members.

+ +

In 2015 a group of concerned developers, users, and software integrators formed +HTACG with the goal of revitalizing Tidy, which had fallen into a +non-maintained state. As a W3C Community Group, HTACG was deemed worthy by the +W3C, and W3C passed ownership of their project to HTACG, where it is currently +being developed and prepped for a new, stable, and modern release.

+ +

HTACG is also working diligently with the SourceForge maintainers in an effort +to harmonize HTML Tidy into a single, stable, solid release once again.

+ + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_license.dox b/build/documentation/pages/page_license.dox new file mode 100644 index 0000000..b719223 --- /dev/null +++ b/build/documentation/pages/page_license.dox @@ -0,0 +1,11 @@ +/*! + + +\page license License +
+\htmlinclude LICENSE.md
+
+ + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_tidy.dox b/build/documentation/pages/page_tidy.dox new file mode 100644 index 0000000..64e3887 --- /dev/null +++ b/build/documentation/pages/page_tidy.dox @@ -0,0 +1,12 @@ +/*! + + +\page tidy5_cmd `tidy5` command + +
+\htmlinclude tidy5.cmd.txt
+
+ + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_tidy_config.dox b/build/documentation/pages/page_tidy_config.dox new file mode 100644 index 0000000..38b340f --- /dev/null +++ b/build/documentation/pages/page_tidy_config.dox @@ -0,0 +1,39 @@ +/*! + +\page tidy_config Configuration + +To get a list of all configuration settings, use: +\code{.sh} +tidy -help-config +\endcode + +\section using_config Using a configuration file + +The most convenient way to configure Tidy is by using separate configuration file. + +Assuming you have created a Tidy configuration file named `myconfig.txt` (the name and extension don’t matter), you can instruct Tidy to use it via the +command line option `-config myconfig.txt` for example: + +\code {.sh} +tidy -config myconfig.txt file1.html file2.html +\endcode + +Alternatively, you can name the default config file via the environment +variable named `HTML_TIDY`, the value of which is the absolute path for the config file. + +You can also set config options on the command line by preceding the name of the option +immediately (no intervening space) with the string “--”; for example: + +\code {.sh} +tidy --break-before-br true --show-warnings false +\endcode + +You can find documentation for full set of configuration options on the Quick Reference page. + +\section example_config Example Configuration File + +\include example_config.txt + + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_tidylib.dox b/build/documentation/pages/page_tidylib.dox new file mode 100644 index 0000000..abb5ce6 --- /dev/null +++ b/build/documentation/pages/page_tidylib.dox @@ -0,0 +1,24 @@ +/*! + + + +\page tidylib tidylib + +- \b TidyLib - is easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. + +- \b TidyLib - is designed to use opaque types in the public interface. This allows the application to just pass an integer around and the need to transform data types in different languages is minimized. As a results it’s straight-forward to write very thin library wrappers for C++, Pascal, and COM/ATL. + +- \b TidyLib - eats its own dogfood. HTML Tidy links directly to TidyLib. + +- \b TidyLib - is Thread Safe and Re-entrant. Because there are many uses for HTML Tidy - from content validation, content scraping, conversion to XHTML - it was important to make TidyLib run reasonably well within server applications as well as client side. + +- \b TidyLib - uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface. + + +\section example_hello Example + +\include example.1.c + + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_todo.dox b/build/documentation/pages/page_todo.dox new file mode 100644 index 0000000..de5fad5 --- /dev/null +++ b/build/documentation/pages/page_todo.dox @@ -0,0 +1,10 @@ +/*! + + +\page todo Todo List + +\xrefitem "Todo" "Todo List" + + + +*/ \ No newline at end of file diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox deleted file mode 100644 index 4347e6d..0000000 --- a/build/documentation/tidy_docs.dox +++ /dev/null @@ -1,180 +0,0 @@ -/*! - -\mainpage Tidy home - -\note The repository github.com/htacg/tidy-html5 and this documentation should be considered canonical for HTML Tidy as of 2015-January-15. - -

What is tidy ?

- -- \ref tidylib - - is a C static or dynamic library that developers can integrate into their applications - in order to bring all of Tidy’s power to your favorite tools. - - `tidylib` is used today in desktop applications, web servers, and more. - -- \ref tidy5_cmd - - is a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. - - It corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards. - -\section content Contents - -- \ref tidy5_cmd -- \ref tidylib - - Modules - - \ref todo -- \ref building_tidy -- \ref history -- \ref license - - - -\page tidy5_cmd `tidy5` command - -
-\htmlinclude tidy5.cmd.txt
-
- -\page todo Todo List - -\xrefitem "Todo" "Todo List" - -\page tidylib tidylib - -- \b TidyLib - is easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. - -- \b TidyLib - is designed to use opaque types in the public interface. This allows the application to just pass an integer around and the need to transform data types in different languages is minimized. As a results it’s straight-forward to write very thin library wrappers for C++, Pascal, and COM/ATL. - -- \b TidyLib - eats its own dogfood. HTML Tidy links directly to TidyLib. - -- \b TidyLib - is Thread Safe and Re-entrant. Because there are many uses for HTML Tidy - from content validation, content scraping, conversion to XHTML - it was important to make TidyLib run reasonably well within server applications as well as client side. - -- \b TidyLib - uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface. - - -\section example_hello Example - -\include example.1.c - - -\page building_tidy Building Tidy - -\section Prerequisites - - - \b git - git-scm.com/book/en/v2/Getting-Started-Installing-Git - - \b cmake - cmake.org/download/ - - Appropriate build tools for the platform - -CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build -commands below are only for the command line use. - -Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate -variuous 'native' build files. Running cmake without any parameters will list the generators -available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools -make installed, but many other generators are supported. - -In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the -tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there. - -\section get_source Get the source code - -Tidy’s sourcecode can be found at github.com/htacg/tidy-html5. There are sometimes -several branches, but in general `master` is the most recently updated version. - -\note Note that as “cutting edge,” it may have bugs or other -unstable behavior. If you prefer a stable, officially released version, be sure to have a look -at Releases on the github page. - -In general you can use the Download ZIP button on the github page to download the most recent version of a branch. If you prefer -Git then you can clone the repository to a working machine with: - - -\code{.sh} -git clone git@github.com:htacg/tidy-html5.git -\endcode - -\section compile Compile - -

Enter the `build/cmake` directory

-\code{.sh} -# *nix -cd {your-tidy-html5-directory}/build/cmake - -# windows -cd {your-tidy-html5-directory}\build\cmake -\endcode - -

Configure the build

-\code{.sh} -# *nix -cmake ../../ [-DCMAKE_INSTALL_PREFIX=/path/for/install] - -# windows -cmake ..\..\ -\endcode -By default cmake sets the install path to `/usr/local` in unix. - -If you wanted the binary in say `/usr/bin` instead, then use `-DCMAKE_INSTALL_PREFIX=/usr` - -On windows the default install is to `C:\Program Files\tidy5`, or `C:/Program Files (x86)/tidy5`, which is not very useful. After -the build the `tidy[n].exe` is in the `Release\` directory, and can be copied to any directory in your `PATH` environment variable, for global use. - -If you need the tidy library built as a 'shared' (DLL) library, then in add the command `-DBUILD_SHARED_LIB:BOOL=ON`. -This option is `OFF` by default, so the static library is built and linked with the command line tool for convenience. - - -

Compile

-\code{.sh} -# *nix -make - -# windows -cmake --build . --config Release -\endcode - -

Install

-\code{.sh} -# *nix -[sudo] make install - -# windows -cmake --build . --config Release --target INSTALL -\endcode - - -\page history History - -- This repository originally transferred from w3c.github.com/tidy-html5. - -- First moved to Github from tidy.sourceforge.net - - -

HTML Tidy was created by the W3C’s own Dave Raggett back in the -dawn of the Internet age. His original Internet page is still available and -gives a sense of the early history: Clean up your Web pages with HTML TIDY.

- -

Satisfied with his work Dave passed the torch to a dedicated group of -maintainers at tidy.sourceforge.net where the important tasks of turning -Tidy into a C library and keeping up with developing standards was -performed.

- -

W3C members took a renewed interest in Tidy in 2011 and forked the -project to github (now redirects to new maintainers), where it featured -compatibility with HTML5 via a key contribution from one of the SourceForge -key members.

- -

In 2015 a group of concerned developers, users, and software integrators formed -HTACG with the goal of revitalizing Tidy, which had fallen into a -non-maintained state. As a W3C Community Group, HTACG was deemed worthy by the -W3C, and W3C passed ownership of their project to HTACG, where it is currently -being developed and prepped for a new, stable, and modern release.

- -

HTACG is also working diligently with the SourceForge maintainers in an effort -to harmonize HTML Tidy into a single, stable, solid release once again.

- - -\page license License - -
-\htmlinclude LICENSE.md
-
- -*/ \ No newline at end of file From 09a57d41b276aceb43b2e7ac05ece8afcfae7c17 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 23:55:59 +0000 Subject: [PATCH 08/20] add pages for quiskstart, configuration and scripting --- build/documentation/pages/main_page.dox | 2 + build/documentation/pages/page_tidy.dox | 3 + .../pages/page_tidy_quickstart.dox | 69 +++++++++++++++++++ .../pages/page_tidy_scripting.dox | 31 +++++++++ 4 files changed, 105 insertions(+) create mode 100644 build/documentation/pages/page_tidy_quickstart.dox create mode 100644 build/documentation/pages/page_tidy_scripting.dox diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox index 8b88546..667b6f4 100644 --- a/build/documentation/pages/main_page.dox +++ b/build/documentation/pages/main_page.dox @@ -36,7 +36,9 @@ is converted to \section content Contents - \ref tidy5_cmd + - \ref tidy_quickstart - \ref tidy_config + - \ref tidy_scripting - \ref tidylib - Modules - \ref building_tidy diff --git a/build/documentation/pages/page_tidy.dox b/build/documentation/pages/page_tidy.dox index 64e3887..4487d0d 100644 --- a/build/documentation/pages/page_tidy.dox +++ b/build/documentation/pages/page_tidy.dox @@ -3,6 +3,9 @@ \page tidy5_cmd `tidy5` command + - \subpage tidy_quickstart + - \subpage tidy_config +
 \htmlinclude tidy5.cmd.txt
 
diff --git a/build/documentation/pages/page_tidy_quickstart.dox b/build/documentation/pages/page_tidy_quickstart.dox new file mode 100644 index 0000000..1b05df3 --- /dev/null +++ b/build/documentation/pages/page_tidy_quickstart.dox @@ -0,0 +1,69 @@ +/*! + +\page tidy_quickstart tidy command quickstart + +This is the syntax for invoking Tidy from the command line: +\code{.sh} +tidy [[options] filename] +\endcode + +Tidy defaults to reading from standard input, so if you run Tidy without specifying the filename argument, it will just sit there waiting for input to read. + +Tidy defaults to writing to standard output. So you can pipe output from Tidy to other programs, as well as pipe output from other programs to Tidy. You can page through the output from Tidy by piping it to a pager, e.g.: +\code{.sh} +tidy file.html | less +\endcode + +\section out_file Output to file + +To have Tidy write its output to a file instead, either use the +\code{.sh} +-o filename +or +-output filename +\endcode +option, or redirect standard output to the file. For example: +\code{.sh} +tidy -o output.html index.html +tidy -output output.html index.html +tidy index.html > output.html +\endcode + +All the above run Tidy on the file `index.html` and write the output to the file `output.html`, while writing any error messages to standard error. + +\section out_error Error output + +Tidy defaults to writing its error messages to standard error (that is, to the console where you’re running Tidy). To page through the error messages along with the +output, redirect standard error to standard output, and pipe it to your pager: +\code{.sh} +tidy index.html 2>&1 | less +\endcode +To have Tidy write the errors to a file instead, either use +\code{.sh} +-f filename +or +-file filename +\endcode +option, or redirect standard error to a file: +\code{.sh} +tidy -o output.html -f errs.txt index.html +tidy index.html > output.html 2> errs.txt +\endcode + +Both the above run Tidy on the file `index.html` and writes the output to the file `output.html`, while writing any error messages to the `file errs.txt`. + +Writing the error messages to a file is especially useful if the file you are checking has many errors; reading them from a file instead of the console +or pager can make it easier to review them. + +\section out_modify Modify / Overwrite +You can use the or `-m` or `-modify` option to modify (in-place) the contents of the input file you are checking; that is, to overwrite those contents with the output from Tidy. For example: + +\code{.sh} +tidy -f errs.txt -m index.html +\endcode +That runs Tidy on the file `index.html`, modifying it in place and writing the error messages to the file `errs.txt`. + +\warning If you use the `-m` option, you should first ensure that you have a backup copy of your file. + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_tidy_scripting.dox b/build/documentation/pages/page_tidy_scripting.dox new file mode 100644 index 0000000..1a3eea7 --- /dev/null +++ b/build/documentation/pages/page_tidy_scripting.dox @@ -0,0 +1,31 @@ +/*! + +\page tidy_scripting Running tidy in scripts + +If you want to run Tidy from a Perl, bash, or other scripting language you may find it of value to inspect the result returned +by Tidy when it exits: + +- \b 0 = if everything is fine +- \b 1 = if there were warnings and +- \b 2 = if there were errors. + +\section perl_example_script Example Perl script + +\code{.pl} +if (close(TIDY) == 0) { + my $exitcode = $? >> 8; + if ($exitcode == 1) { + printf STDERR "tidy issued warning messages\n"; + } elsif ($exitcode == 2) { + printf STDERR "tidy issued error messages\n"; + } else { + die "tidy exited with code: $exitcode\n"; + } +} else { + printf STDERR "tidy detected no errors\n"; +} +\endcode + + + +*/ \ No newline at end of file From 2be07760fdb815a2e168599d95d3ce42731a1143 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 23:58:13 +0000 Subject: [PATCH 09/20] add subpage scripting --- build/documentation/pages/page_tidy.dox | 1 + 1 file changed, 1 insertion(+) diff --git a/build/documentation/pages/page_tidy.dox b/build/documentation/pages/page_tidy.dox index 4487d0d..fd9207f 100644 --- a/build/documentation/pages/page_tidy.dox +++ b/build/documentation/pages/page_tidy.dox @@ -5,6 +5,7 @@ - \subpage tidy_quickstart - \subpage tidy_config + - \subpage tidy_scripting
 \htmlinclude tidy5.cmd.txt

From 00969b063124667eb395679bce3194ffea85a36f Mon Sep 17 00:00:00 2001
From: Pedro 
Date: Fri, 6 Mar 2015 00:24:10 +0000
Subject: [PATCH 10/20] create zip file of the docs

---
 build/documentation/build_docs.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh
index bdf038a..dfc438a 100755
--- a/build/documentation/build_docs.sh
+++ b/build/documentation/build_docs.sh
@@ -121,6 +121,18 @@ if [ "$BUILD_API" -eq 1 ]; then
     echo "PROJECT_NUMBER=$TIDY_VERSION"; \ 
     echo "HTML_EXTRA_FILES=$OUTP_DIR/quickref.html ./examples/tidy5.cmd.txt"; ) \
     | doxygen - > /dev/null
+    
+    # cleanup
+    rm "./examples/tidy5.cmd.txt"
+    rm "./examples/LICENSE.md"
+    
+    ## create zip file of docs
+    cd $OUTP_DIR;
+    zip  -r "tidy-docs-$TIDY_VERSION.zip" ./tidylib_api
+    
+    
+    
+    
   echo "\nTidyLib API documentation has been built."
 else
   echo "* $OUTP_DIR/tidylib_api/ was skipped because not all dependencies were satisfied."

From 5fde57fcd45b9097bc4acf43c7cb0f136cb38d34 Mon Sep 17 00:00:00 2001
From: Pedro 
Date: Fri, 6 Mar 2015 01:01:22 +0000
Subject: [PATCH 11/20] Add featured options, and include config list

---
 build/documentation/.gitignore                |   2 +-
 build/documentation/build_docs.sh             |   4 +-
 build/documentation/pages/main_page.dox       |  11 +-
 .../pages/page_featured_options.dox           | 142 ++++++++++++++++++
 build/documentation/pages/page_tidy.dox       |   5 +-
 .../documentation/pages/page_tidy_config.dox  |   7 +-
 6 files changed, 160 insertions(+), 11 deletions(-)
 create mode 100644 build/documentation/pages/page_featured_options.dox

diff --git a/build/documentation/.gitignore b/build/documentation/.gitignore
index ea87efb..90f15a5 100644
--- a/build/documentation/.gitignore
+++ b/build/documentation/.gitignore
@@ -1,7 +1,7 @@
 
 # file created during build_docs 
 # = tidy5 -h > tidy5.cmd.txt
-examples/tidy5.cmd.txt
+examples/tidy5.*.txt
 
 # The license file needs to copies to examples for \include
 examples/LICENSE.md
diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh
index dfc438a..d1baa29 100755
--- a/build/documentation/build_docs.sh
+++ b/build/documentation/build_docs.sh
@@ -108,7 +108,9 @@ if [ "$BUILD_API" -eq 1 ]; then
   echo "The following is doxygen's stderr output. It doesn't indicate errors with this script:\n"
   
   # echo the output of tidy5 --help so we can include
-  $TIDY_PATH -h > "./examples/tidy5.cmd.txt"
+  $TIDY_PATH -h > "./examples/tidy5.help.txt"
+  $TIDY_PATH -help-config > "./examples/tidy5.config.txt"
+  
   
   ## copy license file to examples for includsing
   cp ../../LICENSE.md ./examples/
diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox
index 667b6f4..cc3e6fb 100644
--- a/build/documentation/pages/main_page.dox
+++ b/build/documentation/pages/main_page.dox
@@ -24,20 +24,21 @@ is converted to
 \endcode
 
 
-

tidy and this project has two parts

+

This project has two parts:

- \ref tidylib - - is a C static or dynamic library that developers can integrate into their applications + - a C static or dynamic library that developers can integrate into their applications in order to bring all of Tidy’s power to your favorite tools. -- \ref tidy5_cmd - - is a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. +- \ref tidy_cmd + - a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. \section content Contents -- \ref tidy5_cmd +- \ref tidy_cmd - \ref tidy_quickstart - \ref tidy_config + - \ref featured_options - \ref tidy_scripting - \ref tidylib - Modules diff --git a/build/documentation/pages/page_featured_options.dox b/build/documentation/pages/page_featured_options.dox new file mode 100644 index 0000000..8e751a6 --- /dev/null +++ b/build/documentation/pages/page_featured_options.dox @@ -0,0 +1,142 @@ +/*! + + +\page featured_options Featured Options + +\section indenting Indenting output for readability + +Indenting the source markup of an HTML document makes the markup easier to read. Tidy can indent the +markup for an HTML document while recognizing elements whose contents should not be indented. In the +example below, Tidy indents the output while preserving the formatting of the `
` element:
+
+Input:
+\code{.html}
+
+ 
+ Test document
+ 
+ 
+ 

This example shows how Tidy can indent output while preserving + formatting of particular elements.

+ +
This is
+ genuine
+       preformatted
+    text
+ 
+ + + \endcode + + Output: +\code{.html} + + + Test document + + + +

This example shows how Tidy can indent output while preserving + formatting of particular elements.

+
+This is
+genuine
+       preformatted
+   text
+
+ + +\endcode + +Tidy’s indenting behavior is not perfect and can sometimes cause your output to be rendered by browsers in a different way than the input. You can +avoid unexpected indenting-related rendering problems by setting `indent:no` or `indent:auto` in a config file. + +\note + Preserving original indenting not possible

+ Tidy is not capable of preserving the original indenting of the markup from the input it receives. That’s because Tidy starts by + building a clean parse tree from the input, and that parse tree doesn’t contain any information about the original indenting. Tidy then + pretty-prints the parse tree using the current config settings. Trying to preserve the original + indenting from the input would interact badly with the repair operations needed to build a clean parse tree, and would considerably complicate the code. + + +\section encodings Encodings and character references + +Tidy defaults to assuming you want output to be encoded in `UTF-8`. But Tidy offers you a choice of other +character encodings: `US ASCII`, `ISO Latin-1`, and the `ISO 2022` family of 7 bit encodings. + +Tidy doesn’t yet recognize the use of the HTML `` element for specifying the character encoding. + +The full set of HTML character references are defined. Cleaned-up output uses named character references for characters when appropriate. Otherwise, +characters outside the normal range are output as numeric character references. + +\section accessibility Accessibility + +Tidy offers advice on potential accessibility problems for people using non-graphical browsers. + +\section cleaning_presentational Cleaning up presentational markup + +Some tools generate HTML with presentational elements such as ``, ``, and `
`. Tidy’s -clean option will replace those elements with ` + + + + + + + + + + + diff --git a/build/documentation/style.css b/build/documentation/style.css index f96a5a2..b8c4fc8 100644 --- a/build/documentation/style.css +++ b/build/documentation/style.css @@ -185,4 +185,35 @@ dl.bug dl.section dd { margin-bottom: 6px; +} + + +/* Quickref */ +table.quickref { + font-size: 10pt; + font-family: monospace; +} +table td.h2 { + background-color: #333333; + color: #eeeeee; +} +table td.h3 { + background-color: #333333; + color: #eeeeee; + padding: 8px; + border-top-left-radius: 8px; +} +table td.h3top { + background-color: #333333; + padding: 8px; + border-top-right-radius: 8px; + text-align: right; +} +.h3topa { + color: #333333; +} + + +table td.tabletitle { + background-color: #cccccc; } \ No newline at end of file From e016418fe686cd008b8af7b52444d67db1573caf Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 04:29:06 +0000 Subject: [PATCH 16/20] Output tidy.tags file to docs output --- build/documentation/build_docs.sh | 1 + build/documentation/doxygen.cfg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index 62254d2..770fc27 100755 --- a/build/documentation/build_docs.sh +++ b/build/documentation/build_docs.sh @@ -122,6 +122,7 @@ if [ "$BUILD_API" -eq 1 ]; then # - which are then passed to doxygen as stdin (instead of the path to a config.file) ( cat "$DOXY_CFG"; \ echo "PROJECT_NUMBER=$TIDY_VERSION"; \ + echo "GENERATE_TAGFILE=$OUTP_DIR/tidylib_api/tidy.tags"; \ echo "HTML_EXTRA_FILES= ./examples/tidy5.help.txt ./examples/tidy5.config.txt"; ) \ | doxygen - > /dev/null diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index 79a3346..9268ccd 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -1669,7 +1669,7 @@ TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = tidy.tags +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes From 3d9085c6f1269db89ef49692df21b369cfbdf520 Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 05:34:12 +0000 Subject: [PATCH 17/20] cleanup formatting of quickref --- build/documentation/build_docs.sh | 2 +- build/documentation/quickref.include.xsl | 94 +++++++++++++----------- build/documentation/style.css | 49 +++++++++++- 3 files changed, 101 insertions(+), 44 deletions(-) diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index 770fc27..ebb7b4b 100755 --- a/build/documentation/build_docs.sh +++ b/build/documentation/build_docs.sh @@ -133,7 +133,7 @@ if [ "$BUILD_API" -eq 1 ]; then ## create zip file of docs cd $OUTP_DIR; - zip -r "tidy-docs-$TIDY_VERSION.zip" ./tidylib_api + #zip -r "tidy-docs-$TIDY_VERSION.zip" ./tidylib_api diff --git a/build/documentation/quickref.include.xsl b/build/documentation/quickref.include.xsl index 5f3c990..01c32d7 100644 --- a/build/documentation/quickref.include.xsl +++ b/build/documentation/quickref.include.xsl @@ -121,9 +121,9 @@ - - - + + + @@ -150,59 +150,69 @@ - Options Reference +

- -   - + - + - Top - - - Type:
- - - - Default: - - - Default: - - - - - - -
Example: -
- -
Example: - -
-
- - - - - -
-
-
+ Top - - + Type: + + + + Default: + + + + + + - + + + + + Example: + + + + + + - + + + + + + + + See Also: + + + + , + + + + + + + + + + +   diff --git a/build/documentation/style.css b/build/documentation/style.css index b8c4fc8..0799f32 100644 --- a/build/documentation/style.css +++ b/build/documentation/style.css @@ -193,9 +193,20 @@ table.quickref { font-size: 10pt; font-family: monospace; } +table.quickref td.qrow { + border-bottom: 1px solid #cccccc !important; +} table td.h2 { + padding: 0; +} +.qh2 { background-color: #333333; - color: #eeeeee; + color: #eeeeee !important; + padding: 10px; + border-radius: 4px; + border: none; + margin: 0; + } table td.h3 { background-color: #333333; @@ -216,4 +227,40 @@ table td.h3top { table td.tabletitle { background-color: #cccccc; + font-size: 8pt; +} +table td.qoptiontitle { + background-color: #cccccc; + font-size: 10pt; + font-weight: bold; + font-family: monospace; + padding-left: 5px; +} + + +.qlabel { + text-align: right; + font-size: 9pt; + width: 80px; + border-bottom: 1px solid #bbbbbb; + + background-color: #dddddd; + font-family: sans-serif; +} +.qvalu { + font-size: 9pt; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + font-family: monospace; + border-left: 1px solid #bbbbbb; +} + +.qdescription { + font-size: 11pt; + color: #333333; + margin: 0; + padding: 5px; + line-height: 140%; + border-left: 1px solid #bbbbbb; + border-bottom: 1px solid #bbbbbb; } \ No newline at end of file From 6455593ab0c8c51b5cec19e9046a4b2a489078ce Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 06:38:57 +0000 Subject: [PATCH 18/20] tidy quickref and other nitpicking docs --- build/documentation/DoxygenLayout.xml | 2 +- build/documentation/README.md | 4 ++- build/documentation/pages/main_page.dox | 12 +++---- build/documentation/pages/page_building.dox | 1 + .../pages/page_featured_options.dox | 2 ++ build/documentation/pages/page_quickref.dox | 10 ++++++ build/documentation/pages/page_tidy.dox | 1 + .../documentation/pages/page_tidy_config.dox | 2 +- build/documentation/quickref.include.xsl | 16 ++++----- build/documentation/style.css | 36 +++++++++++++++---- 10 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 build/documentation/pages/page_quickref.dox diff --git a/build/documentation/DoxygenLayout.xml b/build/documentation/DoxygenLayout.xml index 9deb824..6d8ed41 100644 --- a/build/documentation/DoxygenLayout.xml +++ b/build/documentation/DoxygenLayout.xml @@ -3,7 +3,7 @@ - + diff --git a/build/documentation/README.md b/build/documentation/README.md index 46ad387..faf0fa4 100644 --- a/build/documentation/README.md +++ b/build/documentation/README.md @@ -1,4 +1,6 @@ -# Documentation HOWTO +Documentation HOWTO {#docs_howto} +======================== +Instructions for generating documentation \note For linking to these docs, the doxygen tag file is `tidy.tags` diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox index 4fceef9..eda8488 100644 --- a/build/documentation/pages/main_page.dox +++ b/build/documentation/pages/main_page.dox @@ -34,7 +34,7 @@ is converted to - a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more. \section content Contents - +- \ref quick_ref - \ref tidy_cmd - \ref tidy_quickstart - \ref tidy_config @@ -43,14 +43,10 @@ is converted to - \ref tidylib - Modules - \ref building_tidy -- \ref history -- \ref license +-\ref docs_howto +- \subpage history +- \subpage license - \ref todo - -\page quickref Quick Reference - -\htmlinclude quickref_include.html - */ \ No newline at end of file diff --git a/build/documentation/pages/page_building.dox b/build/documentation/pages/page_building.dox index 60e3afd..a376757 100644 --- a/build/documentation/pages/page_building.dox +++ b/build/documentation/pages/page_building.dox @@ -5,6 +5,7 @@ How to compile and install Tidy from source code. + \section Prerequisites - \b git - git-scm.com/book/en/v2/Getting-Started-Installing-Git diff --git a/build/documentation/pages/page_featured_options.dox b/build/documentation/pages/page_featured_options.dox index 8e751a6..9a8e36f 100644 --- a/build/documentation/pages/page_featured_options.dox +++ b/build/documentation/pages/page_featured_options.dox @@ -3,6 +3,8 @@ \page featured_options Featured Options +Overview of common tasks + \section indenting Indenting output for readability Indenting the source markup of an HTML document makes the markup easier to read. Tidy can indent the diff --git a/build/documentation/pages/page_quickref.dox b/build/documentation/pages/page_quickref.dox new file mode 100644 index 0000000..94f6530 --- /dev/null +++ b/build/documentation/pages/page_quickref.dox @@ -0,0 +1,10 @@ +/*! + +\page quick_ref Quick Ref + +Quick reference generated from the tidy command + +\htmlinclude quickref_include.html + + +*/ \ No newline at end of file diff --git a/build/documentation/pages/page_tidy.dox b/build/documentation/pages/page_tidy.dox index 91a75e7..44cda77 100644 --- a/build/documentation/pages/page_tidy.dox +++ b/build/documentation/pages/page_tidy.dox @@ -1,5 +1,6 @@ /*! +Running the tidy command \page tidy_cmd tidy command diff --git a/build/documentation/pages/page_tidy_config.dox b/build/documentation/pages/page_tidy_config.dox index f09cc80..9f04d40 100644 --- a/build/documentation/pages/page_tidy_config.dox +++ b/build/documentation/pages/page_tidy_config.dox @@ -28,7 +28,7 @@ immediately (no intervening space) with the string “--”; for example: tidy --break-before-br true --show-warnings false \endcode -You can find documentation for full set of configuration options on the Quick Reference page. +You can find documentation for full set of configuration options on the \ref quickref page. \section example_config Example Configuration File diff --git a/build/documentation/quickref.include.xsl b/build/documentation/quickref.include.xsl index 01c32d7..32a47e9 100644 --- a/build/documentation/quickref.include.xsl +++ b/build/documentation/quickref.include.xsl @@ -21,8 +21,8 @@ - -

Option Groups

+ +

Option Groups

  • HTML, XHTML, XML
  • Diagnostics
  • @@ -115,7 +115,7 @@ Options - Top + Top @@ -146,10 +146,10 @@ -   +   - +

    @@ -158,11 +158,11 @@ - - + +

    - Top + Top diff --git a/build/documentation/style.css b/build/documentation/style.css index 0799f32..9e032c2 100644 --- a/build/documentation/style.css +++ b/build/documentation/style.css @@ -190,22 +190,29 @@ dl.section dd { /* Quickref */ table.quickref { - font-size: 10pt; + font-size: 9pt; font-family: monospace; } +table.quickref tr:hover{ + background-color: #F6FF88; +} table.quickref td.qrow { border-bottom: 1px solid #cccccc !important; } table td.h2 { padding: 0; + margin: 0; } .qh2 { background-color: #333333; color: #eeeeee !important; padding: 10px; - border-radius: 4px; + border-radius: 5px; border: none; margin: 0; + padding: 8px; + font-size: 15pt; + width: 100%; } table td.h3 { @@ -219,8 +226,12 @@ table td.h3top { padding: 8px; border-top-right-radius: 8px; text-align: right; + font-size: 8pt; } -.h3topa { +table td.h3top a{ + color: #dddddd !important; +} +.h3topssssa { color: #333333; } @@ -229,12 +240,23 @@ table td.tabletitle { background-color: #cccccc; font-size: 8pt; } -table td.qoptiontitle { - background-color: #cccccc; - font-size: 10pt; + +td.tabletitlelink { + font-size: 8pt; +} +td.qoptiontitletd { + padding: 0; + margin: 0; +} +h4.qoptiontitle { + background-color: #bbbbbb; + font-size: 11pt; font-weight: bold; font-family: monospace; - padding-left: 5px; + padding: 5px 5px 5px 10px; + margin: 0; + border-top-left-radius: 5px; + border-top-right-radius: 5px; } From 32af35602d5a1bba94d30ecfb0093010fa736d34 Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 07:02:47 +0000 Subject: [PATCH 19/20] Add tableofcontents and generally nitpick things --- build/documentation/DoxygenLayout.xml | 1 - build/documentation/pages/page_building.dox | 6 ++++- .../pages/page_featured_options.dox | 4 ++- build/documentation/pages/page_quickref.dox | 2 ++ .../documentation/pages/page_tidy_config.dox | 4 +++ .../pages/page_tidy_quickstart.dox | 2 ++ build/documentation/pages/page_tidylib.dox | 25 +++++++++++++++++++ 7 files changed, 41 insertions(+), 3 deletions(-) diff --git a/build/documentation/DoxygenLayout.xml b/build/documentation/DoxygenLayout.xml index 6d8ed41..1580088 100644 --- a/build/documentation/DoxygenLayout.xml +++ b/build/documentation/DoxygenLayout.xml @@ -3,7 +3,6 @@ - diff --git a/build/documentation/pages/page_building.dox b/build/documentation/pages/page_building.dox index a376757..15b22b9 100644 --- a/build/documentation/pages/page_building.dox +++ b/build/documentation/pages/page_building.dox @@ -5,6 +5,7 @@ How to compile and install Tidy from source code. +\tableofcontents \section Prerequisites @@ -79,7 +80,10 @@ make cmake --build . --config Release \endcode -

    Install

    + +\section compileOnstall Install +Install the applicatio and library with + \code{.sh} # *nix [sudo] make install diff --git a/build/documentation/pages/page_featured_options.dox b/build/documentation/pages/page_featured_options.dox index 9a8e36f..564adf9 100644 --- a/build/documentation/pages/page_featured_options.dox +++ b/build/documentation/pages/page_featured_options.dox @@ -3,7 +3,9 @@ \page featured_options Featured Options -Overview of common tasks +Overview of popular features and problems + +\tableofcontents \section indenting Indenting output for readability diff --git a/build/documentation/pages/page_quickref.dox b/build/documentation/pages/page_quickref.dox index 94f6530..8ccf47b 100644 --- a/build/documentation/pages/page_quickref.dox +++ b/build/documentation/pages/page_quickref.dox @@ -4,6 +4,8 @@ Quick reference generated from the tidy command + + \htmlinclude quickref_include.html diff --git a/build/documentation/pages/page_tidy_config.dox b/build/documentation/pages/page_tidy_config.dox index 9f04d40..f8b3d21 100644 --- a/build/documentation/pages/page_tidy_config.dox +++ b/build/documentation/pages/page_tidy_config.dox @@ -2,6 +2,10 @@ \page tidy_config Configuration +Configuration settings and files + +\tableofcontents + To get a list of all configuration settings, see \ref config_options below or use: \code{.sh} tidy -help-config diff --git a/build/documentation/pages/page_tidy_quickstart.dox b/build/documentation/pages/page_tidy_quickstart.dox index 1b05df3..4cde469 100644 --- a/build/documentation/pages/page_tidy_quickstart.dox +++ b/build/documentation/pages/page_tidy_quickstart.dox @@ -2,6 +2,8 @@ \page tidy_quickstart tidy command quickstart +\tableofcontents + This is the syntax for invoking Tidy from the command line: \code{.sh} tidy [[options] filename] diff --git a/build/documentation/pages/page_tidylib.dox b/build/documentation/pages/page_tidylib.dox index 3e7d726..ebd534a 100644 --- a/build/documentation/pages/page_tidylib.dox +++ b/build/documentation/pages/page_tidylib.dox @@ -6,6 +6,8 @@ About the tidylib C library and code +\tableofcontents + \section about_tidylib TidyLib features - easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. @@ -18,6 +20,29 @@ About the tidylib C library and code - uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface. +\section return_code Return codes + +It’s important to understand that API functions that return an integer almost universally adhere to the following convention: + +- \b 0 == \b Success + - Good to go. +- \b 1 == \b Warnings, but no errors + - Check the error buffer or track error messages for details. +- \b 2 == \b Errors (and maybe warnings) + - By default, Tidy will not produce output. You can force output with the TidyForceOutput option. As with warnings, check error buffer or track error messages for details. +- < 0 == Severe error + - Usually value equals `-errno`. See errno.h. + +Also, by default, warning and error messages are sent to stderr. You can redirect diagnostic +output using either tidySetErrorFile() or tidySetErrorBuffer(). See tidy.h for details. + + +\section app_notes Application Notes + +Of course, there are functions to parse and save both markup and configuration files. For the adventurous, it is possible to create new input sources and output sinks. For example, a URL source could pull the markup from a given URL. + +It is also worth remembering that an application may instantiate any number of document and buffer objects. They are fairly cheap to initialize and destroy (just memory allocation and zeroing, really), so they may be created and destroyed locally, as needed. There is no problem keeping them around a while for keeping state. For example, a server app might keep a global document as a master configuration. As documents are parsed, they can copy their configuration data from the master instance. See tidyOptCopyConfig(). If the master copy is initialized at startup, no synchronization is necessary. + \section example_hello tidylib example From 16fa65662be42c12a4843b5a1c6275e986885bfd Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 07:38:16 +0000 Subject: [PATCH 20/20] add history diagram and style to directory tables --- build/documentation/pages/main_page.dox | 2 +- build/documentation/pages/page_history.dox | 23 +++++++++++++++++++--- build/documentation/style.css | 16 +++++++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/build/documentation/pages/main_page.dox b/build/documentation/pages/main_page.dox index eda8488..c8a6532 100644 --- a/build/documentation/pages/main_page.dox +++ b/build/documentation/pages/main_page.dox @@ -2,7 +2,7 @@ \mainpage Tidy home -\note The repository github.com/htacg/tidy-html5 and this documentation should be considered canonical for HTML Tidy as of 2015-January-15. +\note The repository github.com/htacg/tidy-html5 and this documentation should be considered canonical for HTML Tidy as of 2015-January-15. See \ref history \b Tidy corrects and cleans up HTML content by fixing markup errors such as mismatched, misnested and missing tags, missing end "/" tags, missing quotations et all, eg: diff --git a/build/documentation/pages/page_history.dox b/build/documentation/pages/page_history.dox index 75346ac..88d5f19 100644 --- a/build/documentation/pages/page_history.dox +++ b/build/documentation/pages/page_history.dox @@ -29,9 +29,26 @@ being developed and prepped for a new, stable, and modern release.

    to harmonize HTML Tidy into a single, stable, solid release once again.

    - -- This repository originally transferred from w3c.github.com/tidy-html5. -- First moved to Github from tidy.sourceforge.net +\code +                                                                                       +  +-----------------------------+                                                      +  | w3.org/People/Raggett/tidy/ |                                                      +  ++-------------+--------------+                                                      +   |             |                                                                     +   |             |    +----------------------+                                         +   |             +--> |tidy.sourceforge.net  |                                         +   |                  +------------------+---+                                         +   |                                     |                                             +   |       +--------------------+------+ | Soon                                        +   +-->    | github.com/w3c/tidy|html5 | |                                             +           +-+------------------+------+ |                                             +             |                           |                                             +             |                           |    +-------------------------------+        +             |                           +->  | You are here:                 |        +             |                                | github.com/htacg/tidy-html5   |        +             +----------------------------->  +----------------------+--------+        +                                                                                       +\endcode */ \ No newline at end of file diff --git a/build/documentation/style.css b/build/documentation/style.css index 9e032c2..e8b9868 100644 --- a/build/documentation/style.css +++ b/build/documentation/style.css @@ -188,6 +188,22 @@ dl.section dd { } + +table.directory tr { + border-bottom: 1px solid #cccccc !important; +} + +table.directory tr:hover { + background-color: #F6FF88 !important; +} + + +table.directory td { + padding: 5px; + font-family: sans-serif; +} + +/*****************************************************/ /* Quickref */ table.quickref { font-size: 9pt;