diff --git a/.update-readme-help.py b/.update-readme-help.py index 965f3e2f..2df2960f 100755 --- a/.update-readme-help.py +++ b/.update-readme-help.py @@ -7,10 +7,11 @@ ["duct", "--help"], check=True, text=True, encoding="utf-8", stdout=subprocess.PIPE ).stdout +help_content = f"```shell\n>duct --help\n\n{help_content}\n```\n" readme = Path("README.md") text = readme.read_text(encoding="utf-8") text = re.sub( - r"(?<=\n).*(?=^)", + r"(?<=\n).*(?=^)", help_content, text, flags=re.S | re.M, diff --git a/README.md b/README.md index bffad6c1..d4b4e93b 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ Try it out! A process wrapper script that monitors the execution of a command. + ```shell -> duct --help +>duct --help - usage: duct [-h] [--version] [-p OUTPUT_PREFIX] [--sample-interval SAMPLE_INTERVAL] [--report-interval REPORT_INTERVAL] [-c {all,none,stdout,stderr}] @@ -62,5 +62,6 @@ options: -t {all,system-summary,processes-samples}, --record-types {all,system-summary,processes-samples} Record system-summary, processes-samples, or all (default: all) - + ``` +