Deal with version reporting better.

This commit is contained in:
Michael[tm] Smith 2012-03-01 17:22:03 +09:00
parent 82bada2038
commit 1c4d43ad2a
10 changed files with 2398 additions and 85 deletions

View file

@ -2,16 +2,17 @@ HTML2MARKDOWN=html2text
GIT=git
GITFLAGS=
all: bin/tidy README.md VERSION
all: README.md src/version.h bin/tidy
bin/tidy:
$(MAKE) -C build/gmake
$(MAKE) -C build/gmake doc
README.md: README.html
$(HTML2MARKDOWN) $(HTML2MARKDOWNFLAGS) $< > $@
VERSION:
$(GIT) $(GITFLAGS) log --pretty=format:'https://github.com/w3c/tidy-html5/tree/%h' -n 1 > $@
src/version.h:
$(GIT) $(GITFLAGS) log --pretty=format:'static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/%h";' -n 1 > $@
install:
sudo $(MAKE) install -C build/gmake
@ -19,3 +20,4 @@ install:
clean:
$(MAKE) clean -C build/gmake
$(RM) README.md
$(RM) src/version.h

View file

@ -7,8 +7,8 @@
</style>
</head>
<h1>Tidy for HTML5</h1>
<p>This repo is a fork of the code from
<h1>HTML Tidy for HTML5 (experimental)</h1>
<p>This repo is an experimental fork of the code from
<a href="http://tidy.sourceforge.net">tidy.sourceforge.net</a>.
This source code in this version supports processing of HTML5 documents.
The changes for HTML5 support started from a

View file

@ -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
code in this version supports processing of HTML5 documents. The changes for
HTML5 support started from a [patch developed by Björn Höhrmann][2].
This repo is an experimental fork of the code from [tidy.sourceforge.net][1].
This source code in this version supports processing of HTML5 documents. The
changes for HTML5 support started from a [patch developed by Björn
Höhrmann][2].
[1]: http://tidy.sourceforge.net

View file

@ -1 +0,0 @@
https://github.com/w3c/tidy-html5/tree/35f2516

View file

@ -416,14 +416,16 @@ static void help( ctmbstr prog )
{
printf( "%s [option...] [file...] [option...] [file...]\n", prog );
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");
#ifdef PLATFORM_NAME
printf( "Options for HTML Tidy for %s from https://github.com/w3c/tidy-html5\n",
PLATFORM_NAME);
printf( "Options for HTML Tidy for %s:\n", PLATFORM_NAME );
#else
printf( "Options for HTML Tidy from https://github.com/w3c/tidy-html5\n");
printf( "Options for HTML Tidy:\n");
#endif
printf( "\n");
@ -434,9 +436,24 @@ static void help( ctmbstr prog )
"to the man page.\n\n");
printf( "Input/Output default to stdin/stdout respectively.\n");
printf( "\n");
printf( "Single letter options apart from -f may be combined\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");
}
@ -903,10 +920,10 @@ static void optionvalues( TidyDoc tdoc )
static void version( void )
{
#ifdef PLATFORM_NAME
printf( "HTML Tidy for %s from https://github.com/w3c/tidy-html5\n",
PLATFORM_NAME);
printf( "HTML Tidy for HTML5 (experimental) for %s %s\n",
PLATFORM_NAME, tidyReleaseDate() );
#else
printf( "HTML Tidy from https://github.com/w3c/tidy-html5\n");
printf( "HTML Tidy for HTML5 (experimental) %s\n", tidyReleaseDate() );
#endif
}

2322
htmldoc/quickref.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -47,8 +47,8 @@
<xsl:template name="header-section">
<xsl:text/>.\" tidy man page for the HTML5 for of Tidy
.TH TIDY 1 "https://github.com/w3c/tidy-html5" "HTML Tidy" "https://github.com/w3c/tidy-html5"
<xsl:text/>.\" tidy man page for the HTML5 fork of Tidy
.TH TIDY 1 "<xsl:value-of select="cmdline/@version" />" "HTML Tidy" "<xsl:value-of select="cmdline/@version" />"
</xsl:template>
@ -78,37 +78,6 @@ Input/Output default to stdin/stdout respectively. Single letter options apart f
.LP
.in 1i
\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
.TP
.B HTML_TIDY
@ -384,12 +353,42 @@ appearing in content with another backslash.
<!-- Appears at the bottom of the man page: -->
<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
\fBTidy\fR was written by \fBDave Raggett\fR &lt;dsr@w3.org&gt;, and was for a long while maintained by a team at http://tidy.sourceforge.net/
\fBTidy\fR was written by \fBDave Raggett\fR &lt;dsr@w3.org&gt;, and susequently maintained by a team at http://tidy.sourceforge.net/
.LP
The HTML5 fork of \fBTidy\fR is at https://github.com/w3c/tidy-html5/
.LP
The sources for \fBTidy\fR are available under the MIT Licence.
The sources for the HTML5 fork of \fBTidy\fR are available at https://github.com/w3c/tidy-html5/ under the MIT Licence.
</xsl:template>

View file

@ -1408,10 +1408,10 @@ Bool TY_(AddGenerator)( TidyDocImpl* doc )
if (head)
{
#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());
#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
for ( node = head->content; node; node = node->next )

15
src/version.h Executable file → Normal file
View file

@ -1,14 +1 @@
/* 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)[] = "16 November 2011";
static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/82bada2";

View file

@ -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";