summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Doc/tools/mkackshtml
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/tools/mkackshtml
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/tools/mkackshtml')
-rwxr-xr-xsys/src/cmd/python/Doc/tools/mkackshtml66
1 files changed, 66 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/tools/mkackshtml b/sys/src/cmd/python/Doc/tools/mkackshtml
new file mode 100755
index 000000000..2c79f5eb1
--- /dev/null
+++ b/sys/src/cmd/python/Doc/tools/mkackshtml
@@ -0,0 +1,66 @@
+#! /usr/bin/env python
+# -*- Python -*-
+
+import string
+import support
+import sys
+
+
+def collect(fp):
+ names = []
+ while 1:
+ line = fp.readline()
+ if not line:
+ break
+ line = string.strip(line)
+ 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 = []
+ for i in range(options.columns):
+ colnums.append(percol*i)
+ options.aesop_type = "information"
+ fp = options.get_output_file()
+ fp.write(string.rstrip(options.get_header()) + "\n")
+ fp.write(THANKS + "\n")
+ fp.write('<table width="100%" align="center">\n')
+ for i in range(percol):
+ fp.write(" <tr>\n")
+ for j in colnums:
+ try:
+ fp.write(" <td>%s</td>\n" % names[i + j])
+ except IndexError:
+ pass
+ fp.write(" </tr>\n")
+ fp.write("</table>\n")
+ fp.write(string.rstrip(options.get_footer()) + "\n")
+ fp.close()
+
+THANKS = '''\
+
+<p>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 <a
+href="mailto:docs@python.org">docs@python.org</a>), and
+we will be glad to correct the problem.</p>
+
+<p>It is only with the input and contributions of the Python community
+that Python has such wonderful documentation -- <b>Thank You!</b></p>
+
+'''
+
+
+if __name__ == "__main__":
+ main()