mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 01:06:50 +00:00
cosmetic: s/cmdfile/doc/
This commit is contained in:
parent
6f9e04bc21
commit
824f9c72a2
1 changed files with 6 additions and 6 deletions
12
setup.py
12
setup.py
|
@ -153,17 +153,17 @@ def run(self):
|
|||
for command, parser in choices.items():
|
||||
if command is 'help':
|
||||
continue
|
||||
with open('docs/usage/%s.rst.inc' % command, 'w') as cmdfile:
|
||||
with open('docs/usage/%s.rst.inc' % command, 'w') as doc:
|
||||
print('generating help for %s' % command)
|
||||
params = {"command": command,
|
||||
"underline": '-' * len('borg ' + command)}
|
||||
cmdfile.write(".. _borg_{command}:\n\n".format(**params))
|
||||
cmdfile.write("borg {command}\n{underline}\n::\n\n".format(**params))
|
||||
doc.write(".. _borg_{command}:\n\n".format(**params))
|
||||
doc.write("borg {command}\n{underline}\n::\n\n".format(**params))
|
||||
epilog = parser.epilog
|
||||
parser.epilog = None
|
||||
cmdfile.write(re.sub("^", " ", parser.format_help(), flags=re.M))
|
||||
cmdfile.write("\nDescription\n~~~~~~~~~~~\n")
|
||||
cmdfile.write(epilog)
|
||||
doc.write(re.sub("^", " ", parser.format_help(), flags=re.M))
|
||||
doc.write("\nDescription\n~~~~~~~~~~~\n")
|
||||
doc.write(epilog)
|
||||
|
||||
|
||||
class build_api(Command):
|
||||
|
|
Loading…
Reference in a new issue