summaryrefslogtreecommitdiffstats
path: root/Doc/tools/getpagecounts
blob: f3596375df980d049678f1d86e1ae600880d9880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
#  -*- Ksh -*-
#
# Generate a page count report of the PostScript version of the manuals.

TOTAL=0

getpagecount() {
    PAGECOUNT=`grep -c '^%%Page:' $1.ps`
    echo "$2    $1.ps ($PAGECOUNT pages)"
    TOTAL=`expr $TOTAL + $PAGECOUNT`
}

cat <<EOF
This is the PostScript version of the standard Python documentation.
If you plan to print this, be aware that some of the documents are
long.  The following manuals are included:

EOF

getpagecount api "Python/C API                                  "
getpagecount ext "Extending and Embedding the Python Interpreter"
getpagecount lib "Python Library Reference                      "
getpagecount mac "Macintosh Module Reference                    "
getpagecount ref "Python Reference Manual                       "
getpagecount tut "Python Tutorial                               "
getpagecount doc "Documenting Python                            "

echo
echo "  Total page count:   $TOTAL"

cat <<EOF


If you have any questions, comments, or suggestions regarding these
documents, please send them via email to python-docs@python.org.

EOF