From 50023e05517902980bca54c1bae98e6647243457 Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Fri, 17 Dec 2010 13:03:21 +0000 Subject: [PATCH] Stripped old HTML doc generation - will add new HTML gen soon --- doc/doc-docbook/Makefile | 31 +--- doc/doc-docbook/TidyHTML-filter | 100 ----------- doc/doc-docbook/TidyHTML-spec | 191 --------------------- release-process/scripts/mk_exim_release.pl | 18 -- 4 files changed, 3 insertions(+), 337 deletions(-) delete mode 100755 doc/doc-docbook/TidyHTML-filter delete mode 100755 doc/doc-docbook/TidyHTML-spec diff --git a/doc/doc-docbook/Makefile b/doc/doc-docbook/Makefile index 68a93b58b..ed0ad8435 100644 --- a/doc/doc-docbook/Makefile +++ b/doc/doc-docbook/Makefile @@ -13,8 +13,9 @@ notarget:; @echo "** You must specify a target, in the form x.y, where x is ' # Generate all the documentation files... # ## removed info files as I cannot generate them - spec.info filter.info -everything: spec.pdf spec.ps spec.html spec.txt \ - filter.pdf filter.ps filter.html filter.txt \ +## removed html files as superceded by new website code +everything: spec.pdf spec.ps spec.txt \ + filter.pdf filter.ps filter.txt \ exim.8 ############################## MAN PAGE ################################ @@ -33,9 +34,6 @@ filter.xml: filter.xfpt filter-pr.xml: filter.xml Pre-xml ./Pre-xml -bookinfo filter-pr.xml -filter-html.xml: filter.xml Pre-xml - ./Pre-xml -html filter-html.xml - filter-txt.xml: filter.xml Pre-xml ./Pre-xml -ascii -html -quoteliteral filter-txt.xml @@ -85,13 +83,6 @@ filter.pdf: sdop-filter.pdf ### ### -filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \ - MyStyle-html.xsl MyStyle.xsl - /bin/rm -rf filter.html filter-html.html - xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml - /bin/mv -f filter-html.html filter.html - ./TidyHTML-filter - filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ MyStyle.xsl /bin/rm -rf filter-txt.html @@ -120,10 +111,6 @@ spec.xml: spec.xfpt spec-pr.xml: spec.xml Pre-xml ./Pre-xml -optbreak spec-pr.xml -spec-html.xml: spec.xml Pre-xml - ./Pre-xml -html -oneindex \ - spec-html.xml - spec-txt.xml: spec.xml Pre-xml ./Pre-xml -ascii -html -noindex -quoteliteral \ spec-txt.xml @@ -176,12 +163,6 @@ spec.pdf: sdop-spec.pdf ### ### -spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \ - MyStyle-html.xsl MyStyle.xsl - /bin/rm -rf spec_html - xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml - ./TidyHTML-spec - spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ MyStyle.xsl /bin/rm -rf spec-txt.html @@ -266,12 +247,6 @@ test.pdf: sdop-test.pdf ### -test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \ - MyStyle.xsl - /bin/rm -rf test.html test-html.html - xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml - /bin/mv -f test-html.html test.html - test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ MyStyle.xsl /bin/rm -rf test-txt.html diff --git a/doc/doc-docbook/TidyHTML-filter b/doc/doc-docbook/TidyHTML-filter deleted file mode 100755 index 70bb86520..000000000 --- a/doc/doc-docbook/TidyHTML-filter +++ /dev/null @@ -1,100 +0,0 @@ -#! /usr/bin/perl - -# $Cambridge: exim/doc/doc-docbook/TidyHTML-filter,v 1.3 2006/02/01 11:01:01 ph10 Exp $ - -# Script to tidy up the filter HTML file that is generated by xmlto. The -# following changes are made: -# -# 1. Split very long lines. -# 2. Create reverse links from chapter and section titles back to the TOC. -# 3. Turn

into

and -# a matching

into
to get rid of unwanted vertical white -# space. - - -$tocref = 1; -$thisdiv = 0; - -# Read in the filter.html file. - -open(IN, "filter.html") || die "Failed to open filter.html for reading: $!\n"; -@text = ; -close(IN); - -# Insert a newline after every > in the toc, because the whole toc is generated -# as one humungous line that is hard to check. Indeed, the start of the first -# chapter is also on the line, so we have to split if off first. Having -# inserted newlines, we split the toc into separate items in the vector. - -for ($i = 0; $i < scalar(@text); $i++) - { - if ($text[$i] =~ ?Exim's interfaces to mail filtering?) - { - splice @text, $i, 1, (split /(?=
\s*/>\n/g; - splice @text, $i, 1, (split /(?<=\n)/, $text[$i]); - last; - } - } - -# We want to create reverse links from each chapter and section title back to -# the relevant place in the TOC. Scan the TOC for the relevant entries. Add -# an id to each entry, and create tables that remember the new link ids. We -# detect the start of the TOC by
/) - { - my($ss) = $1; - my($id) = sprintf "%04d", $tocref++; - $text[$i] =~ s/<\/a>(.*?)<\/h(.*)/) - { - my($ref) = $backref{"#$2"}; - $text[$i] = "$1$4

(?:
)?(.*)/) - { - my($j); - $text[$i] = "$1

$2"; - - for ($j = $i + 1; $j < scalar(@text); $j++) - { - if ($text[$j] =~ /^<\/p><\/div>/) - { - $text[$j] =~ s/<\/p>//; - last; - } - } - } - } - -# Write out the revised file - -open(OUT, ">filter.html") || die "Failed to open filter.html for writing: $!\n"; -print OUT @text; -close(OUT); - -# End diff --git a/doc/doc-docbook/TidyHTML-spec b/doc/doc-docbook/TidyHTML-spec deleted file mode 100755 index 4e7b8a2ca..000000000 --- a/doc/doc-docbook/TidyHTML-spec +++ /dev/null @@ -1,191 +0,0 @@ -#! /usr/bin/perl - -# $Cambridge: exim/doc/doc-docbook/TidyHTML-spec,v 1.4 2006/04/04 14:03:49 ph10 Exp $ - -# Script to tidy up the spec HTML files that are generated by xmlto. The -# following changes are made: -# -# 1. Tidy the index.html file by splitting the very long lines. -# 2. Create reverse links from chapter and section titles back to the TOC. -# 3. Tidy the ix01.html file - the actual index - by splitting long lines. -# 4. Insert links from the letter divisions to the top of the Index. -# 5. Turn

into

and -# a matching

into
to get rid of unwanted vertical white -# space. -# 6. Before each occurrence of insert   so that the table's cell -# is a little bit wider than the text itself. - -chdir "spec_html"; - -$tocref = 1; - -# Read in the index.html file. It's really the TOC. - -open(IN, "index.html") || die "Failed to open index.html for reading: $!\n"; -@toc = ; -close(IN); - -# Insert a newline after every > except when it is preceded by 'class="quote"', -# because the whole toc is generated as one humungous line that is hard to -# check. We have to avoid it in the quote case because that puts a space into -# the output, and similarly for the the comes afterwards. Easy way out -# is just not to do it for all occurrences. Unfortunately, Perl does -# not implement lookbehinds where the alternatives are of different lengths, so -# we have to take two passes. - - -foreach $line (@toc) - { - $line =~ s/(?\s*/>\n/g; - $line =~ s/<\/span>\n/<\/span>/g; - } - -# Split the lines so that each one is a separate element in the vector. - -for ($i = 0; $i < scalar(@toc); $i++) - { splice @toc, $i, 1, (split /(?<=\n)/, $toc[$i]); } - -# We want to create reverse links from each chapter and section title back to -# the relevant place in the TOC. Scan the TOC for the relevant entries. Add -# an id to each entry, and create tables that remember the file names and the -# new link ids. - -foreach $line (@toc) - { - if ($line =~ /^/) - { - my($chix) = $1; - my($ss) = $2; - my($id) = sprintf "%04d", $tocref++; - $line =~ s/index.html") || die "Failed to open index.html for writing: $!\n"; -print OUT @toc; -close(OUT); - -# Now scan each of the other page files and insert the reverse links. While -# we are at it, we tidy up \n") - { - $text[$i] = ""; - $thisdiv = 0; - } - elsif ($text[$i] =~ /^\s*<\/td>/) - { - $text[$i] = " $text[$i]"; - } - } - - open(OUT, ">$file") || die "Failed to open $file for writing: $!\n"; - print OUT @text; - close(OUT); - } - -# Now process the ix01.html file - -open(IN, "ix01.html") || die "Failed to open ix01.html for reading: $!\n"; -@index = ; -close(IN); - -# Insert a newline after every > because the whole index is generated as one -# humungous line that is hard to check. Then split the lines so that each one -# is a separate element in the vector. - -foreach $line (@index) { $line =~ s/>\s*/>\n/g; } -for ($i = 0; $i < scalar(@index); $i++) - { splice @index, $i, 1, (split /(?<=\n)/, $index[$i]); } - -# We want to add a list of letters at the top of the index, and link back -# to them from each letter heading. First find the index title and remember -# where to insert the list of letters. - -for ($i = 0; $i < scalar(@index); $i++) - { - if ($index[$i] =~ /^<\/h2>$/) - { - $listindex = $i; - last; - } - } - -# Now scan through for the letter headings and build the cross references, -# while also building up the list to insert. - -$list = "

\n"; -for (; $i < scalar(@index); $i++) - { - if ($index[$i] =~ /^(.)<\/h3>$/) - { - $letter = $1; - $index[$i-1] =~ s/^//; - $index[$i] =~ s/$/<\/a>/; - $list .= " $letter\n"; - } - } - -# Now we know which letters we have, we can insert the list. - -$list .= "

\n"; -splice @index, $listindex, 0, $list; - -# Write out the modified index.html file. - -open (OUT, ">ix01.html") || die "Failed to open ix01.html for writing: $!\n"; -print OUT @index; -close(OUT); - - -# End diff --git a/release-process/scripts/mk_exim_release.pl b/release-process/scripts/mk_exim_release.pl index f062baba5..eea116917 100755 --- a/release-process/scripts/mk_exim_release.pl +++ b/release-process/scripts/mk_exim_release.pl @@ -160,23 +160,6 @@ sub build_pspdfinfo_directory { # ------------------------------------------------------------------ -sub build_html_directory { - my $context = shift; - - my $dir = sprintf( 'exim-%s-%s', 'html', $context->{release} ); - my $target = File::Spec->catdir( $dir, 'doc', 'html' ); - mkpath( $target, { verbose => ( $verbose || $debug ) } ); - - # move documents across - move( File::Spec->catdir( 'doc/doc-docbook', 'spec_html' ), File::Spec->catdir( $target, 'spec_html' ) ); - foreach my $file ( glob( File::Spec->catfile( 'doc/doc-docbook', '*.html' ) ) ) { - my $fn = ( File::Spec->splitpath($file) )[2]; - move( $file, File::Spec->catfile( $target, $fn ) ); - } -} - -# ------------------------------------------------------------------ - sub build_main_package_directory { my $context = shift; @@ -200,7 +183,6 @@ sub build_package_directories { build_main_package_directory($context); build_pspdfinfo_directory($context); - build_html_directory($context); } # ------------------------------------------------------------------ -- 2.30.2