Mercurial > hg
comparison doc/gendoc.py @ 9792:dd1a95ccbe07
doc: use titlecase in man page section titles
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 08 Nov 2009 11:46:38 +0100 |
parents | 9d1a480ca6ea |
children | 08a0f04b56bd |
comparison
equal
deleted
inserted
replaced
9791:8bba9157b30a | 9792:dd1a95ccbe07 |
---|---|
59 ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s))) | 59 ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s))) |
60 def subsection(s): | 60 def subsection(s): |
61 ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s))) | 61 ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s))) |
62 | 62 |
63 # print options | 63 # print options |
64 section(_("OPTIONS")) | 64 section(_("Options")) |
65 for optstr, desc in get_opts(globalopts): | 65 for optstr, desc in get_opts(globalopts): |
66 ui.write("%s\n %s\n\n" % (optstr, desc)) | 66 ui.write("%s\n %s\n\n" % (optstr, desc)) |
67 | 67 |
68 # print cmds | 68 # print cmds |
69 section(_("COMMANDS")) | 69 section(_("Commands")) |
70 h = {} | 70 h = {} |
71 for c, attr in table.items(): | 71 for c, attr in table.items(): |
72 f = c.split("|")[0] | 72 f = c.split("|")[0] |
73 f = f.lstrip("^") | 73 f = f.lstrip("^") |
74 h[f] = c | 74 h[f] = c |
102 # print topics | 102 # print topics |
103 for names, sec, doc in helptable: | 103 for names, sec, doc in helptable: |
104 for name in names: | 104 for name in names: |
105 ui.write(".. _%s:\n" % name) | 105 ui.write(".. _%s:\n" % name) |
106 ui.write("\n") | 106 ui.write("\n") |
107 section(sec.upper()) | 107 section(sec) |
108 if callable(doc): | 108 if callable(doc): |
109 doc = doc() | 109 doc = doc() |
110 ui.write(doc) | 110 ui.write(doc) |
111 ui.write("\n") | 111 ui.write("\n") |
112 | 112 |