[Python-checkins] python/dist/src/Doc/tools getpagecounts,1.7,1.7.26.1

fdrake@sourceforge.net fdrake@sourceforge.net
Tue, 16 Apr 2002 20:29:28 -0700


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

Modified Files:
      Tag: release22-maint
	getpagecounts 
Log Message:
Remove Emacs turd; not needed with modern Emacs versions.

Add a -r option; if given with a release number, the "What's New" document
is included with the relevant version number.

Update the text of the README distributed with the PostScript files to
reflect the changes in the user organizations in the Python community.


Index: getpagecounts
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/getpagecounts,v
retrieving revision 1.7
retrieving revision 1.7.26.1
diff -C2 -d -r1.7 -r1.7.26.1
*** getpagecounts	28 Apr 2000 17:05:41 -0000	1.7
--- getpagecounts	17 Apr 2002 03:29:26 -0000	1.7.26.1
***************
*** 1,4 ****
  #! /usr/bin/env python
- #  -*- Python -*-
  
  """Generate a page count report of the PostScript version of the manuals."""
--- 1,3 ----
***************
*** 6,9 ****
--- 5,11 ----
  __version__ = '$Revision$'
  
+ import getopt
+ import sys
+ 
  
  class PageCounter:
***************
*** 12,15 ****
--- 14,18 ----
          self.total = 0
          self.title_width = 0
+         self.version = ""
  
      def add_document(self, prefix, title):
***************
*** 26,30 ****
--- 29,45 ----
          print "  Total page count:  %d" % self.total
  
+     def parse_options(self):
+         opts, args = getopt.getopt(sys.argv[1:], "r:", ["release="])
+         assert not args
+         for opt, arg in opts:
+             if opt in ("-r", "--release"):
+                 self.version = arg
+ 
      def run(self):
+         self.parse_options()
+         if self.version:
+             version = self.version[:3]
+             self.add_document("whatsnew" + version.replace(".", ""),
+                               "What's New in Python " + version)
          for prefix, title in [
              ("api", "Python/C API"),
***************
*** 49,57 ****
  to print this, *please* print two-sided if you have a printer capable
  of it!  To locate published copies of the larger manuals, or other
! Python reference material, consult the PSA Online Bookstore at:
  
!              http://www.python.org/psa/bookstore/
  
! The following manuals are included:
  """
      SUFFIX = """\
--- 64,72 ----
  to print this, *please* print two-sided if you have a printer capable
  of it!  To locate published copies of the larger manuals, or other
! Python reference material, consult the Python Bookstore at:
  
!              http://www.amk.ca/bookstore/
  
! The following manuals are included in this package:
  """
      SUFFIX = """\
***************
*** 60,69 ****
  If you have any questions, comments, or suggestions regarding these
  documents, please send them via email to python-docs@python.org.
- 
- If you would like to support the development and maintenance of
- documentation for Python, please consider joining the Python Software
- Activity (PSA; see http://www.python.org/psa/), or urging your
- organization to join the PSA or the Python Consortium (see
- http://www.python.org/consortium/).
  """
  
--- 75,78 ----