From b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 16 Dec 2014 16:33:23 +0100 Subject: [README] Add table of contents (Closes #4458) --- devscripts/prepare_manpage.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'devscripts') diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index f66bebfea..7ece37754 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): -- cgit v1.2.3