summaryrefslogtreecommitdiff
path: root/man/docgen
diff options
context:
space:
mode:
authorSimon Howard2010-12-10 22:44:01 +0000
committerSimon Howard2010-12-10 22:44:01 +0000
commit8dab0a3e635db40359c8ddeb9afaa9eca626ee98 (patch)
treecfd01bd0c96a97fcffad588782a5d106ca1b3d2f /man/docgen
parent005747a6174d2d5b72e1af196a72cafb9b801a58 (diff)
parent678a8f9aeea9fa1966b3e8a94974688fda4d8fe1 (diff)
downloadchocolate-doom-8dab0a3e635db40359c8ddeb9afaa9eca626ee98.tar.gz
chocolate-doom-8dab0a3e635db40359c8ddeb9afaa9eca626ee98.tar.bz2
chocolate-doom-8dab0a3e635db40359c8ddeb9afaa9eca626ee98.zip
Merge from trunk. This is slightly out of date as I did the merge
several days ago. Subversion-branch: /branches/raven-branch Subversion-revision: 2212
Diffstat (limited to 'man/docgen')
-rwxr-xr-xman/docgen25
1 files changed, 11 insertions, 14 deletions
diff --git a/man/docgen b/man/docgen
index 73e8c852..bfde7aef 100755
--- a/man/docgen
+++ b/man/docgen
@@ -150,11 +150,8 @@ config_files = {}
show_vanilla_options = True
class Parameter:
- def __cmp__(self, other):
- if self.name < other.name:
- return -1
- else:
- return 1
+ def __lt__(self, other):
+ return self.name < other.name
def __init__(self):
self.text = ""
@@ -389,7 +386,7 @@ def print_template(template_file, content):
try:
for line in f:
line = line.replace("@content", content)
- print line.rstrip()
+ print(line.rstrip())
finally:
f.close()
@@ -407,7 +404,7 @@ def wiki_output(targets, template):
read_wikipages()
for t in targets:
- print t.wiki_output()
+ print(t.wiki_output())
def plaintext_output(targets, template_file):
@@ -419,13 +416,13 @@ def plaintext_output(targets, template_file):
print_template(template_file, content)
def usage():
- print "Usage: %s [-V] [-c filename ]( -m | -w | -p ) <directory>" \
- % sys.argv[0]
- print " -c : Provide documentation for the specified configuration file"
- print " -m : Manpage output"
- print " -w : Wikitext output"
- print " -p : Plaintext output"
- print " -V : Don't show Vanilla Doom options"
+ print("Usage: %s [-V] [-c filename ]( -m | -w | -p ) <directory>" \
+ % sys.argv[0])
+ print(" -c : Provide documentation for the specified configuration file")
+ print(" -m : Manpage output")
+ print(" -w : Wikitext output")
+ print(" -p : Plaintext output")
+ print(" -V : Don't show Vanilla Doom options")
sys.exit(0)
# Parse command line