blob: ac126e09c5f7f71534242ee46695de60d9d9561a [file] [log] [blame]
Fred Drakef23431d2000-10-05 05:15:29 +00001#! /usr/bin/env python
2# -*- Python -*-
3
4import support
5import sys
6
7
8def collect(fp):
9 names = []
10 while 1:
11 line = fp.readline()
12 if not line:
13 break
Guido van Rossum0368b722007-05-11 16:50:42 +000014 line = line.strip()
Fred Drakef23431d2000-10-05 05:15:29 +000015 if line:
16 names.append(line)
17 else:
18 names = []
19 return names
20
21
22def main():
23 options = support.Options()
24 options.columns = 4
25 options.variables["title"] = "Acknowledgements"
26 options.parse(sys.argv[1:])
27 names = collect(sys.stdin)
Collin Winter65d09d42007-03-21 02:11:39 +000028 percol = (len(names) + options.columns - 1) // options.columns
Fred Drake498cb152001-02-12 19:12:55 +000029 colnums = []
30 for i in range(options.columns):
31 colnums.append(percol*i)
Fred Drakee03e1fe2002-04-05 17:34:50 +000032 options.aesop_type = "information"
Fred Drakef23431d2000-10-05 05:15:29 +000033 fp = options.get_output_file()
Guido van Rossum0368b722007-05-11 16:50:42 +000034 fp.write(options.get_header().rstrip() + "\n")
Fred Drake498cb152001-02-12 19:12:55 +000035 fp.write(THANKS + "\n")
36 fp.write('<table width="100%" align="center">\n')
Fred Drakef23431d2000-10-05 05:15:29 +000037 for i in range(percol):
Fred Drake498cb152001-02-12 19:12:55 +000038 fp.write(" <tr>\n")
Fred Drakef23431d2000-10-05 05:15:29 +000039 for j in colnums:
40 try:
Fred Drake498cb152001-02-12 19:12:55 +000041 fp.write(" <td>%s</td>\n" % names[i + j])
Fred Drakef23431d2000-10-05 05:15:29 +000042 except IndexError:
Fred Drake498cb152001-02-12 19:12:55 +000043 pass
44 fp.write(" </tr>\n")
45 fp.write("</table>\n")
Guido van Rossum0368b722007-05-11 16:50:42 +000046 fp.write(options.get_footer().rstrip() + "\n")
Fred Drake498cb152001-02-12 19:12:55 +000047 fp.close()
Fred Drakef23431d2000-10-05 05:15:29 +000048
49THANKS = '''\
50
51<p>These people have contributed in some way to the Python
52documentation. This list is probably not complete -- if you feel that
53you or anyone else should be on this list, please let us know (send
54email to <a
Fred Drake9d843082003-07-30 02:55:28 +000055href="mailto:docs@python.org">docs@python.org</a>), and
Fred Drakef23431d2000-10-05 05:15:29 +000056we will be glad to correct the problem.</p>
57
58<p>It is only with the input and contributions of the Python community
59that Python has such wonderful documentation -- <b>Thank You!</b></p>
60
61'''
62
63
64if __name__ == "__main__":
65 main()