diff --git a/bin/make_manual.py b/bin/make_manual.py index d2e756457..2d0fd580e 100755 --- a/bin/make_manual.py +++ b/bin/make_manual.py @@ -7,6 +7,7 @@ conversion into man pages etc. import os import re import time +import subprocess from datetime import datetime docpath = "docs/content" @@ -192,13 +193,23 @@ def main(): command_docs = read_commands(docpath).replace("\\", "\\\\") # escape \ so we can use command_docs in re.sub build_date = datetime.utcfromtimestamp( int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) + help_output = subprocess.check_output(["rclone", "help"]).decode("utf-8") with open(outfile, "w") as out: out.write("""\ %% rclone(1) User Manual %% Nick Craig-Wood %% %s -""" % build_date.strftime("%b %d, %Y")) +# NAME + +rclone - manage files on cloud storage + +# SYNOPSIS + +``` +%s +``` +""" % (build_date.strftime("%b %d, %Y"), help_output)) for doc in docs: contents = read_doc(doc) # Substitute the commands into doc.md