From f23431da11cd79b53e4a33ebfd4646024e75caf0 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 5 Oct 2000 05:15:29 +0000 Subject: New script to convert the ACKS file to a nicely formatted HTML file. Uses the new support module. --- Doc/tools/mkackshtml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 Doc/tools/mkackshtml diff --git a/Doc/tools/mkackshtml b/Doc/tools/mkackshtml new file mode 100755 index 0000000..36f4d2a --- /dev/null +++ b/Doc/tools/mkackshtml @@ -0,0 +1,62 @@ +#! /usr/bin/env python +# -*- Python -*- + +import support +import sys + + +def collect(fp): + names = [] + while 1: + line = fp.readline() + if not line: + break + line = line.strip() + if line: + names.append(line) + else: + names = [] + return names + + +def main(): + options = support.Options() + options.columns = 4 + options.variables["title"] = "Acknowledgements" + options.parse(sys.argv[1:]) + names = collect(sys.stdin) + percol = (len(names) + options.columns - 1) / options.columns + colnums = [percol*i for i in range(options.columns)] + fp = options.get_output_file() + print >>fp, options.get_header().rstrip() + print >>fp, THANKS + print >>fp, '' + for i in range(percol): + print >>fp, " " + for j in colnums: + try: + print >>fp, " " % names[i + j] + except IndexError: + print >>fp, " " + print >>fp, " " + print >>fp, "
%s 
" + print >>fp, options.get_footer().rstrip() + + +THANKS = '''\ + +

These people have contributed in some way to the Python +documentation. This list is probably not complete -- if you feel that +you or anyone else should be on this list, please let us know (send +email to python-docs@python.org), and +we will be glad to correct the problem.

+ +

It is only with the input and contributions of the Python community +that Python has such wonderful documentation -- Thank You!

+ +''' + + +if __name__ == "__main__": + main() -- cgit v0.12