diff options
author | Simon Howard | 2013-08-10 23:32:29 +0000 |
---|---|---|
committer | Simon Howard | 2013-08-10 23:32:29 +0000 |
commit | b1d51276a264849ded93ce943eb0283c1f4f1aba (patch) | |
tree | e274c46741a10f4636bc89e485afcd0b1b59f144 /man/docgen | |
parent | e33e44276d9fc605d0c5096d4ec85e423e8eec8a (diff) | |
download | chocolate-doom-b1d51276a264849ded93ce943eb0283c1f4f1aba.tar.gz chocolate-doom-b1d51276a264849ded93ce943eb0283c1f4f1aba.tar.bz2 chocolate-doom-b1d51276a264849ded93ce943eb0283c1f4f1aba.zip |
Split manpage.template into separate files for different games.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2614
Diffstat (limited to 'man/docgen')
-rwxr-xr-x | man/docgen | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -34,6 +34,8 @@ import re import glob import getopt +INCLUDE_STATEMENT_RE = re.compile("@include\s+(\S+)") + # Find the maximum width of a list of parameters (for plain text output) def parameter_list_width(params): @@ -405,8 +407,13 @@ def print_template(template_file, content): try: for line in f: - line = line.replace("@content", content) - print(line.rstrip()) + match = INCLUDE_STATEMENT_RE.search(line) + if match: + filename = match.group(1) + print_template(filename, content) + else: + line = line.replace("@content", content) + print(line.rstrip()) finally: f.close() |