[Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.23,1.24

Fred L. Drake fdrake@users.sourceforge.net
Fri, 02 Mar 2001 08:26:47 -0800


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv25676

Modified Files:
	mkhowto 
Log Message:

Job.build_html():  When formatting HTML into more than one HTML page, and
    not doing the \label{foo} --> foo.html transformation (--numeric was
    specified on the command line), still look to see if there is an
    "About this document..." node and copy that to "about.html", since the
    page footers use that as the target.


Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** mkhowto	2001/02/19 19:18:09	1.23
--- mkhowto	2001/03/02 16:26:45	1.24
***************
*** 369,379 ****
          shutil.copyfile(os.path.join(builddir, self.doc + ".html"),
                          os.path.join(builddir, "index.html"))
!         if max_split_depth != 1 and not self.options.numeric:
!             pwd = os.getcwd()
!             try:
!                 os.chdir(builddir)
!                 self.run("%s %s *.html" % (PERL_BINARY, NODE2LABEL_SCRIPT))
!             finally:
!                 os.chdir(pwd)
  
      def build_text(self, tempdir=None):
--- 369,397 ----
          shutil.copyfile(os.path.join(builddir, self.doc + ".html"),
                          os.path.join(builddir, "index.html"))
!         if max_split_depth != 1:
!             if self.options.numeric:
!                 label_file = os.path.join(builddir, "labels.pl")
!                 fp = open(label_file)
!                 about_node = None
!                 target = " = q/about/;\n"
!                 x = len(target)
!                 while 1:
!                     line = fp.readline()
!                     if not line:
!                         break
!                     if line[-x:] == target:
!                         line = fp.readline()
!                         m = re.search(r"\|(node\d+\.[a-z]+)\|", line)
!                         about_node = m.group(1)
!                         shutil.copyfile(os.path.join(builddir, about_node),
!                                         os.path.join(builddir, "about.html"))
!                         break
!             else:
!                 pwd = os.getcwd()
!                 try:
!                     os.chdir(builddir)
!                     self.run("%s %s *.html" % (PERL_BINARY, NODE2LABEL_SCRIPT))
!                 finally:
!                     os.chdir(pwd)
  
      def build_text(self, tempdir=None):