Deal with version reporting better.
This commit is contained in:
parent
82bada2038
commit
1c4d43ad2a
8
Makefile
8
Makefile
|
@ -2,16 +2,17 @@ HTML2MARKDOWN=html2text
|
||||||
GIT=git
|
GIT=git
|
||||||
GITFLAGS=
|
GITFLAGS=
|
||||||
|
|
||||||
all: bin/tidy README.md VERSION
|
all: README.md src/version.h bin/tidy
|
||||||
|
|
||||||
bin/tidy:
|
bin/tidy:
|
||||||
$(MAKE) -C build/gmake
|
$(MAKE) -C build/gmake
|
||||||
|
$(MAKE) -C build/gmake doc
|
||||||
|
|
||||||
README.md: README.html
|
README.md: README.html
|
||||||
$(HTML2MARKDOWN) $(HTML2MARKDOWNFLAGS) $< > $@
|
$(HTML2MARKDOWN) $(HTML2MARKDOWNFLAGS) $< > $@
|
||||||
|
|
||||||
VERSION:
|
src/version.h:
|
||||||
$(GIT) $(GITFLAGS) log --pretty=format:'https://github.com/w3c/tidy-html5/tree/%h' -n 1 > $@
|
$(GIT) $(GITFLAGS) log --pretty=format:'static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/%h";' -n 1 > $@
|
||||||
|
|
||||||
install:
|
install:
|
||||||
sudo $(MAKE) install -C build/gmake
|
sudo $(MAKE) install -C build/gmake
|
||||||
|
@ -19,3 +20,4 @@ install:
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) clean -C build/gmake
|
$(MAKE) clean -C build/gmake
|
||||||
$(RM) README.md
|
$(RM) README.md
|
||||||
|
$(RM) src/version.h
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<h1>Tidy for HTML5</h1>
|
<h1>HTML Tidy for HTML5 (experimental)</h1>
|
||||||
<p>This repo is a fork of the code from
|
<p>This repo is an experimental fork of the code from
|
||||||
<a href="http://tidy.sourceforge.net">tidy.sourceforge.net</a>.
|
<a href="http://tidy.sourceforge.net">tidy.sourceforge.net</a>.
|
||||||
This source code in this version supports processing of HTML5 documents.
|
This source code in this version supports processing of HTML5 documents.
|
||||||
The changes for HTML5 support started from a
|
The changes for HTML5 support started from a
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# Tidy for HTML5
|
# HTML Tidy for HTML5 (experimental)
|
||||||
|
|
||||||
This repo is a fork of the code from [tidy.sourceforge.net][1]. This source
|
This repo is an experimental fork of the code from [tidy.sourceforge.net][1].
|
||||||
code in this version supports processing of HTML5 documents. The changes for
|
This source code in this version supports processing of HTML5 documents. The
|
||||||
HTML5 support started from a [patch developed by Björn Höhrmann][2].
|
changes for HTML5 support started from a [patch developed by Björn
|
||||||
|
Höhrmann][2].
|
||||||
|
|
||||||
[1]: http://tidy.sourceforge.net
|
[1]: http://tidy.sourceforge.net
|
||||||
|
|
||||||
|
|
|
@ -416,14 +416,16 @@ static void help( ctmbstr prog )
|
||||||
{
|
{
|
||||||
printf( "%s [option...] [file...] [option...] [file...]\n", prog );
|
printf( "%s [option...] [file...] [option...] [file...]\n", prog );
|
||||||
printf( "Utility to clean up and pretty print HTML/XHTML/XML\n");
|
printf( "Utility to clean up and pretty print HTML/XHTML/XML\n");
|
||||||
printf( "See http://tidy.sourceforge.net/\n");
|
printf( "\n");
|
||||||
|
|
||||||
|
printf( "This is an HTML5-aware experimental fork of HTML Tidy.\n");
|
||||||
|
printf( "%s\n", tidyReleaseDate() );
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
|
|
||||||
#ifdef PLATFORM_NAME
|
#ifdef PLATFORM_NAME
|
||||||
printf( "Options for HTML Tidy for %s from https://github.com/w3c/tidy-html5\n",
|
printf( "Options for HTML Tidy for %s:\n", PLATFORM_NAME );
|
||||||
PLATFORM_NAME);
|
|
||||||
#else
|
#else
|
||||||
printf( "Options for HTML Tidy from https://github.com/w3c/tidy-html5\n");
|
printf( "Options for HTML Tidy:\n");
|
||||||
#endif
|
#endif
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
|
|
||||||
|
@ -434,9 +436,24 @@ static void help( ctmbstr prog )
|
||||||
"to the man page.\n\n");
|
"to the man page.\n\n");
|
||||||
|
|
||||||
printf( "Input/Output default to stdin/stdout respectively.\n");
|
printf( "Input/Output default to stdin/stdout respectively.\n");
|
||||||
|
printf( "\n");
|
||||||
printf( "Single letter options apart from -f may be combined\n");
|
printf( "Single letter options apart from -f may be combined\n");
|
||||||
printf( "as in: tidy -f errs.txt -imu foo.html\n");
|
printf( "as in: tidy -f errs.txt -imu foo.html\n");
|
||||||
printf( "For further info on HTML see http://www.w3.org/MarkUp\n");
|
printf( "\n");
|
||||||
|
printf( "For more information on HTML, see the following:\n" );
|
||||||
|
printf( "\n");
|
||||||
|
printf( " HTML: Edition for Web Authors (the latest HTML specification)\n");
|
||||||
|
printf( " http://dev.w3.org/html5/spec-author-view\n" );
|
||||||
|
printf( "\n");
|
||||||
|
printf( " HTML: The Markup Language (an HTML language reference)\n" );
|
||||||
|
printf( " http://dev.w3.org/html5/markup/\n" );
|
||||||
|
printf( "\n");
|
||||||
|
printf( "File bug reports at https://github.com/w3c/tidy-html5/issues/\n" );
|
||||||
|
printf( "or send questions and comments to html-tidy@w3.org\n" );
|
||||||
|
printf( "\n");
|
||||||
|
printf( "Validate your HTML documents using the W3C Nu Markup Validator:\n" );
|
||||||
|
printf( "\n");
|
||||||
|
printf( " http://validator.w3.org/nu/" );
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -903,10 +920,10 @@ static void optionvalues( TidyDoc tdoc )
|
||||||
static void version( void )
|
static void version( void )
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_NAME
|
#ifdef PLATFORM_NAME
|
||||||
printf( "HTML Tidy for %s from https://github.com/w3c/tidy-html5\n",
|
printf( "HTML Tidy for HTML5 (experimental) for %s %s\n",
|
||||||
PLATFORM_NAME);
|
PLATFORM_NAME, tidyReleaseDate() );
|
||||||
#else
|
#else
|
||||||
printf( "HTML Tidy from https://github.com/w3c/tidy-html5\n");
|
printf( "HTML Tidy for HTML5 (experimental) %s\n", tidyReleaseDate() );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2322
htmldoc/quickref.html
Normal file
2322
htmldoc/quickref.html
Normal file
File diff suppressed because it is too large
Load diff
|
@ -47,8 +47,8 @@
|
||||||
|
|
||||||
|
|
||||||
<xsl:template name="header-section">
|
<xsl:template name="header-section">
|
||||||
<xsl:text/>.\" tidy man page for the HTML5 for of Tidy
|
<xsl:text/>.\" tidy man page for the HTML5 fork of Tidy
|
||||||
.TH TIDY 1 "https://github.com/w3c/tidy-html5" "HTML Tidy" "https://github.com/w3c/tidy-html5"
|
.TH TIDY 1 "<xsl:value-of select="cmdline/@version" />" "HTML Tidy" "<xsl:value-of select="cmdline/@version" />"
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,37 +78,6 @@ Input/Output default to stdin/stdout respectively. Single letter options apart f
|
||||||
.LP
|
.LP
|
||||||
.in 1i
|
.in 1i
|
||||||
\fBtidy -f errs.txt -imu foo.html\fR
|
\fBtidy -f errs.txt -imu foo.html\fR
|
||||||
.LP
|
|
||||||
For more information on HTML, see the following:
|
|
||||||
.RS 4
|
|
||||||
.LP
|
|
||||||
\fBHTML: Edition for Web Authors\fR (the latest HTML specification)
|
|
||||||
.br
|
|
||||||
http://dev.w3.org/html5/spec-author-view
|
|
||||||
.LP
|
|
||||||
\fBHTML: The Markup Language\fR (an HTML language reference)
|
|
||||||
.br
|
|
||||||
http://dev.w3.org/html5/markup/
|
|
||||||
.RE
|
|
||||||
.LP
|
|
||||||
For more information about HTML Tidy, see:
|
|
||||||
.RS 4
|
|
||||||
.LP
|
|
||||||
https://github.com/w3c/tidy-html5
|
|
||||||
.RE
|
|
||||||
.LP
|
|
||||||
For bug reports and comments, see:
|
|
||||||
.RS 4
|
|
||||||
.LP
|
|
||||||
https://github.com/w3c/tidy-html5/issues/
|
|
||||||
...or send questions and comments to \fBhtml-tidy@w3.org\fR
|
|
||||||
.RE
|
|
||||||
.LP
|
|
||||||
Validate your HTML documents using the \fBW3C Nu Markup Validator\fR:
|
|
||||||
.RS 4
|
|
||||||
.LP
|
|
||||||
http://validator.w3.org/nu/
|
|
||||||
.RE
|
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
.TP
|
.TP
|
||||||
.B HTML_TIDY
|
.B HTML_TIDY
|
||||||
|
@ -384,12 +353,42 @@ appearing in content with another backslash.
|
||||||
|
|
||||||
<!-- Appears at the bottom of the man page: -->
|
<!-- Appears at the bottom of the man page: -->
|
||||||
<xsl:template name="manpage-see-also-section">
|
<xsl:template name="manpage-see-also-section">
|
||||||
|
.SH SEE ALSO
|
||||||
|
For more information on HTML:
|
||||||
|
.RS 4
|
||||||
|
.LP
|
||||||
|
\fBHTML: Edition for Web Authors\fR (the latest HTML specification)
|
||||||
|
.br
|
||||||
|
http://dev.w3.org/html5/spec-author-view
|
||||||
|
.LP
|
||||||
|
\fBHTML: The Markup Language\fR (an HTML language reference)
|
||||||
|
.br
|
||||||
|
http://dev.w3.org/html5/markup/
|
||||||
|
.RE
|
||||||
|
.LP
|
||||||
|
For more information about the experimental HTML5 fork of HTML Tidy:
|
||||||
|
.RS 4
|
||||||
|
.LP
|
||||||
|
https://github.com/w3c/tidy-html5
|
||||||
|
.RE
|
||||||
|
.LP
|
||||||
|
For bug reports and comments:
|
||||||
|
.RS 4
|
||||||
|
.LP
|
||||||
|
https://github.com/w3c/tidy-html5/issues/
|
||||||
|
.RE
|
||||||
|
.LP
|
||||||
|
Or send questions and comments to \fBhtml-tidy@w3.org\fR
|
||||||
|
.LP
|
||||||
|
Validate your HTML documents using the \fBW3C Nu Markup Validator\fR:
|
||||||
|
.RS 4
|
||||||
|
.LP
|
||||||
|
http://validator.w3.org/nu/
|
||||||
|
.RE
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
\fBTidy\fR was written by \fBDave Raggett\fR <dsr@w3.org>, and was for a long while maintained by a team at http://tidy.sourceforge.net/
|
\fBTidy\fR was written by \fBDave Raggett\fR <dsr@w3.org>, and susequently maintained by a team at http://tidy.sourceforge.net/
|
||||||
.LP
|
.LP
|
||||||
The HTML5 fork of \fBTidy\fR is at https://github.com/w3c/tidy-html5/
|
The sources for the HTML5 fork of \fBTidy\fR are available at https://github.com/w3c/tidy-html5/ under the MIT Licence.
|
||||||
.LP
|
|
||||||
The sources for \fBTidy\fR are available under the MIT Licence.
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1408,10 +1408,10 @@ Bool TY_(AddGenerator)( TidyDocImpl* doc )
|
||||||
if (head)
|
if (head)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_NAME
|
#ifdef PLATFORM_NAME
|
||||||
TY_(tmbsnprintf)(buf, sizeof(buf), "HTML Tidy for "PLATFORM_NAME" from https://github.com/w3c/tidy-html5",
|
TY_(tmbsnprintf)(buf, sizeof(buf), "HTML Tidy for "PLATFORM_NAME" %s",
|
||||||
tidyReleaseDate());
|
tidyReleaseDate());
|
||||||
#else
|
#else
|
||||||
TY_(tmbsnprintf)(buf, sizeof(buf), "HTML Tidy from https://github.com/w3c/tidy-html5");
|
TY_(tmbsnprintf)(buf, sizeof(buf), "HTML Tidy %s", tidyReleaseDate());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for ( node = head->content; node; node = node->next )
|
for ( node = head->content; node; node = node->next )
|
||||||
|
|
15
src/version.h
Executable file → Normal file
15
src/version.h
Executable file → Normal file
|
@ -1,14 +1 @@
|
||||||
/* version information
|
static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/82bada2";
|
||||||
|
|
||||||
(c) 2007-2009 (W3C) MIT, ERCIM, Keio University
|
|
||||||
See tidy.h for the copyright notice.
|
|
||||||
|
|
||||||
CVS Info :
|
|
||||||
|
|
||||||
$Author: arnaud02 $
|
|
||||||
$Date: 2009/03/25 21:37:11 $
|
|
||||||
$Revision: 1.46 $
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const char TY_(release_date)[] = "16 November 2011";
|
|
|
@ -1,14 +0,0 @@
|
||||||
/* version information
|
|
||||||
|
|
||||||
(c) 2007-2009 (W3C) MIT, ERCIM, Keio University
|
|
||||||
See tidy.h for the copyright notice.
|
|
||||||
|
|
||||||
CVS Info :
|
|
||||||
|
|
||||||
$Author: arnaud02 $
|
|
||||||
$Date: 2009/03/25 21:37:11 $
|
|
||||||
$Revision: 1.46 $
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const char TY_(release_date)[] = "25 March 2009";
|
|
Loading…
Reference in a new issue