From 46ab6dfa89e2d5eeed8f85b40c022161e2493800 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 3 Aug 1999 17:54:39 +0000 Subject: Re-write in Python for portability. About 30% slower, but who cares?! --- Doc/tools/getpagecounts | 87 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/Doc/tools/getpagecounts b/Doc/tools/getpagecounts index f359637..ef14053 100755 --- a/Doc/tools/getpagecounts +++ b/Doc/tools/getpagecounts @@ -1,38 +1,73 @@ -#! /bin/sh -# -*- Ksh -*- -# -# Generate a page count report of the PostScript version of the manuals. +#! /usr/bin/env python +# -*- Python -*- -TOTAL=0 +"""Generate a page count report of the PostScript version of the manuals.""" -getpagecount() { - PAGECOUNT=`grep -c '^%%Page:' $1.ps` - echo "$2 $1.ps ($PAGECOUNT pages)" - TOTAL=`expr $TOTAL + $PAGECOUNT` -} +__version__ = '$Revision$' -cat <