diff --git a/build/documentation/.gitignore b/build/documentation/.gitignore new file mode 100644 index 0000000..cc2afff --- /dev/null +++ b/build/documentation/.gitignore @@ -0,0 +1,12 @@ + +# file created during build_docs +# = tidy5 -h > tidy5.cmd.txt +examples/tidy5.*.txt + +# The license file needs to copies to examples for \include +examples/LICENSE.md + +# file generates from xsl +examples/quickref_include.html + + diff --git a/build/documentation/DoxygenLayout.xml b/build/documentation/DoxygenLayout.xml index a90dcf7..1580088 100644 --- a/build/documentation/DoxygenLayout.xml +++ b/build/documentation/DoxygenLayout.xml @@ -3,7 +3,6 @@ - @@ -21,6 +20,7 @@ + diff --git a/build/documentation/README.md b/build/documentation/README.md index 96359e8..faf0fa4 100644 --- a/build/documentation/README.md +++ b/build/documentation/README.md @@ -1,4 +1,8 @@ -# Documentation HOWTO +Documentation HOWTO {#docs_howto} +======================== +Instructions for generating documentation + +\note For linking to these docs, the doxygen tag file is `tidy.tags` **HTML Tidy** provides several types of documentation to suit different purposes. This document describes how to generate the following: diff --git a/build/documentation/build_docs.sh b/build/documentation/build_docs.sh index 11175e2..0c4c500 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` @@ -71,6 +71,7 @@ if [ "$BUILD_XSLT" -eq 1 ]; then # 'quickref.html' xsltproc "quickref.xsl" "tidy-config.xml" > "$OUTP_DIR/quickref.html" + xsltproc "quickref.include.xsl" "tidy-config.xml" > ./examples/quickref_include.html # 'tidy.1' xsltproc "tidy1.xsl" "tidy-help.xml" > "$OUTP_DIR/tidy.1" @@ -108,16 +109,35 @@ 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 > "./$OUTP_DIR/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/ ## this lot # - echos and catches outputs the doxygen config # - overwrites some vars but appending some to config an end # - 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 ./$OUTP_DIR/tidy5.cmd.txt"; ) \ + 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 + + # cleanup + rm "./examples/tidy5.help.txt" + rm "./examples/tidy5.config.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." diff --git a/build/documentation/doxygen.cfg b/build/documentation/doxygen.cfg index 21ba5a1..c7b57e4 100644 --- a/build/documentation/doxygen.cfg +++ b/build/documentation/doxygen.cfg @@ -32,7 +32,7 @@ PROJECT_NAME = "HTML Tidy" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 4.9.15 +PROJECT_NUMBER = version.txt # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer @@ -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 @@ -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. @@ -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 @@ -724,7 +724,8 @@ EXCLUDE_SYMBOLS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = "./" "./temp/" +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 @@ -953,7 +954,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 @@ -1265,7 +1266,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 +1610,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 @@ -1669,7 +1670,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 = +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 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 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..c8a6532 --- /dev/null +++ b/build/documentation/pages/main_page.dox @@ -0,0 +1,52 @@ +/*! + +\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. 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: + + +\code{.html} +


heading

+

sub
heading

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

heading

+

sub

+
+

heading

+
References +\endcode + + +

This project has two parts:

+ +- \ref tidylib + - 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 tidy_cmd + - 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 + - \ref featured_options + - \ref tidy_scripting +- \ref tidylib + - Modules +- \ref building_tidy +-\ref docs_howto +- \subpage history +- \subpage 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..15b22b9 --- /dev/null +++ b/build/documentation/pages/page_building.dox @@ -0,0 +1,98 @@ +/*! + + +\page building_tidy Building Tidy + +How to compile and install Tidy from source code. + +\tableofcontents + +\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 + + +\section compileOnstall Install +Install the applicatio and library with + +\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_featured_options.dox b/build/documentation/pages/page_featured_options.dox new file mode 100644 index 0000000..564adf9 --- /dev/null +++ b/build/documentation/pages/page_featured_options.dox @@ -0,0 +1,146 @@ +/*! + + +\page featured_options Featured Options + +Overview of popular features and problems + +\tableofcontents + +\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 new file mode 100644 index 0000000..e8b9868 --- /dev/null +++ b/build/documentation/style.css @@ -0,0 +1,304 @@ + +body { + background-color: #efefef; +} + +#titlearea { + background-image: url(http://www.html-tidy.org/assets/images/green-abstract-background.jpg); + background-size: cover; +} + +#projectname { + font-family: sans-serif; + font-size: 22pt; + margin: 0 0 0 0; + margin-left: 150px; + padding: 2px 0px; + color: white; +} + +#projectnumber { + font-size: 12pt; +} + +#projectbrief { + font-family: sans-serif; + font-size: 10pt; + color: #dddddd; + margin-left: 150px; +} + + +.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; +} + + + +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; + 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: 5px; + border: none; + margin: 0; + padding: 8px; + font-size: 15pt; + width: 100%; + +} +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; + font-size: 8pt; +} +table td.h3top a{ + color: #dddddd !important; +} +.h3topssssa { + color: #333333; +} + + +table td.tabletitle { + background-color: #cccccc; + font-size: 8pt; +} + +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: 5px 5px 5px 10px; + margin: 0; + border-top-left-radius: 5px; + border-top-right-radius: 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 diff --git a/build/documentation/tidy_docs.dox b/build/documentation/tidy_docs.dox deleted file mode 100644 index 2f7968f..0000000 --- a/build/documentation/tidy_docs.dox +++ /dev/null @@ -1,164 +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 ?

- -- \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` - - 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. - -\section content Contents - -- \ref tidy5_cmd -- \ref building_tidy -- \ref history - - - - -\page tidy5_cmd `tidy5` command - -
-\htmlinclude tidy5.cmd.txt
-
- -\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.

- -*/