summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-17 03:29:40 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-17 03:29:40 (GMT)
commitbab5aa003956b7a06aa89478649c326fd8b6ecf8 (patch)
tree02e385ce1113cabb5a3a4ecb49a3f0f3632009b6 /Doc
parent1f6794622bbb2eba1f7ee7f218ddee1da5715404 (diff)
downloadcpython-bab5aa003956b7a06aa89478649c326fd8b6ecf8.zip
cpython-bab5aa003956b7a06aa89478649c326fd8b6ecf8.tar.gz
cpython-bab5aa003956b7a06aa89478649c326fd8b6ecf8.tar.bz2
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.
Diffstat (limited to 'Doc')
-rwxr-xr-xDoc/tools/getpagecounts29
1 files changed, 19 insertions, 10 deletions
diff --git a/Doc/tools/getpagecounts b/Doc/tools/getpagecounts
index c575c6b..202c73c 100755
--- a/Doc/tools/getpagecounts
+++ b/Doc/tools/getpagecounts
@@ -1,16 +1,19 @@
#! /usr/bin/env python
-# -*- Python -*-
"""Generate a page count report of the PostScript version of the manuals."""
__version__ = '$Revision$'
+import getopt
+import sys
+
class PageCounter:
def __init__(self):
self.doclist = []
self.total = 0
self.title_width = 0
+ self.version = ""
def add_document(self, prefix, title):
count = count_pages(prefix + ".ps")
@@ -25,7 +28,19 @@ class PageCounter:
print
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"),
("ext", "Extending and Embedding the Python Interpreter"),
@@ -48,23 +63,17 @@ If you plan to print this, be aware that some of the documents are
long. It is formatted for printing on two-sided paper; if you do plan
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:
+Python reference material, consult the Python Bookstore at:
- http://www.python.org/psa/bookstore/
+ http://www.amk.ca/bookstore/
-The following manuals are included:
+The following manuals are included in this package:
"""
SUFFIX = """\
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/).
"""
def count_pages(filename):