summaryrefslogtreecommitdiff
path: root/doc/tools/keywords.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tools/keywords.py')
-rw-r--r--doc/tools/keywords.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/tools/keywords.py b/doc/tools/keywords.py
new file mode 100644
index 0000000..6da352a
--- /dev/null
+++ b/doc/tools/keywords.py
@@ -0,0 +1,20 @@
+#! /usr/bin/env python
+
+# This Python program sorts and reformats the table of keywords in ref2.tex
+
+import string
+l = []
+try:
+ while 1:
+ l = l + string.split(raw_input())
+except EOFError:
+ pass
+l.sort()
+for x in l[:]:
+ while l.count(x) > 1: l.remove(x)
+ncols = 5
+nrows = (len(l)+ncols-1)/ncols
+for i in range(nrows):
+ for j in range(i, len(l), nrows):
+ print string.ljust(l[j], 10),
+ print