Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfb4e24

Browse files
committed
Respond to suggestion from "Albert" <[email protected]> to add
document titles to the list of files. Also added total page count and a note that comments should be directed to [email protected].
1 parent 5ebeea0 commit dfb4e24

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

Doc/tools/getpagecounts

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,35 @@
66
cd `dirname $0`/..
77

88
PAPER=${PAPER:-letter}
9+
TOTAL=0
910

11+
getpagecount() {
12+
PAGECOUNT=`grep -c '^%%Page:' paper-$PAPER/$1.ps`
13+
echo "$2 $1.ps ($PAGECOUNT pages)"
14+
TOTAL=`expr $TOTAL + $PAGECOUNT`
15+
}
1016

1117
cat <<EOF
1218
This is the PostScript version of the standard Python documentation.
1319
If you plan to print this, be aware that some of the documents are
14-
long. These files have the following page counts:
20+
long. The following manuals are included:
1521
1622
EOF
1723

24+
getpagecount api "Python/C API "
25+
getpagecount ext "Extending and Embedding the Python Interpreter"
26+
getpagecount lib "Python Library Reference "
27+
getpagecount mac "Macintosh Module Reference "
28+
getpagecount ref "Python Reference Manual "
29+
getpagecount tut "Python Tutorial "
1830

19-
for PART in api ext lib mac ref tut ; do
20-
FILE=paper-$PAPER/$PART.ps
21-
PAGECOUNT=`grep -c '^%%Page:' $FILE`
22-
echo " $PART.ps -- $PAGECOUNT pages"
23-
done
31+
echo
32+
echo " Total page count: $TOTAL"
33+
34+
cat <<EOF
35+
36+
37+
If you have any questions, comments, or suggestions regarding these
38+
documents, please send them via email to [email protected].
39+
40+
EOF

0 commit comments

Comments
 (0)