mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 22:22:27 +00:00
fix formatting
This commit is contained in:
parent
c93d975d3f
commit
45d9c6b3b7
1 changed files with 5 additions and 12 deletions
17
setup.py
17
setup.py
|
@ -151,21 +151,14 @@ def run(self):
|
|||
continue
|
||||
with open('docs/usage/%s.rst.inc' % command, 'w') as cmdfile:
|
||||
print('generating help for %s' % command)
|
||||
cmdfile.write(""".. _borg_{command}:
|
||||
|
||||
borg {command}
|
||||
{underline}
|
||||
::
|
||||
|
||||
""".format(**{"command": command,
|
||||
"underline": '-' * len('borg ' + 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))
|
||||
epilog = parser.epilog
|
||||
parser.epilog = None
|
||||
cmdfile.write(re.sub("^", " ", parser.format_help(), flags=re.M))
|
||||
cmdfile.write("""
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
""")
|
||||
cmdfile.write("\nDescription\n~~~~~~~~~~~\n")
|
||||
cmdfile.write(epilog)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue