diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-12-16 16:33:23 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-12-16 16:33:23 +0100 |
commit | b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0 (patch) | |
tree | eb51d1abe58524eb82ff14d7eba43f4d7bb86295 /devscripts | |
parent | ac78b5e97be3827c1aa7e8dfa4a9f8f1a9cb8122 (diff) | |
download | youtube-dl-b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0.zip youtube-dl-b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0.tar.gz youtube-dl-b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0.tar.bz2 |
[README] Add table of contents (Closes #4458)
Diffstat (limited to 'devscripts')
-rw-r--r-- | devscripts/prepare_manpage.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index f66bebf..7ece377 100644 --- a/devscripts/prepare_manpage.py +++ b/devscripts/prepare_manpage.py @@ -11,8 +11,19 @@ README_FILE = os.path.join(ROOT_DIR, 'README.md') with io.open(README_FILE, encoding='utf-8') as f: readme = f.read() -PREFIX = '%YOUTUBE-DL(1)\n\n# NAME\n' -readme = re.sub(r'(?s)# INSTALLATION.*?(?=# DESCRIPTION)', '', readme) +PREFIX = '''%YOUTUBE-DL(1) + +# NAME + +youtube\-dl \- download videos from youtube.com or other video platforms + +# SYNOPSIS + +**youtube-dl** \[OPTIONS\] URL [URL...] + +''' +readme = re.sub(r'(?s)^.*?(?=# DESCRIPTION)', '', readme) +readme = re.sub(r'\s+youtube-dl \[OPTIONS\] URL \[URL\.\.\.\]', '', readme) readme = PREFIX + readme if sys.version_info < (3, 0): |