youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit b50e3bc67fd864bbb14ed4ccf3f0d29e1ff3e1f0
parent ac78b5e97be3827c1aa7e8dfa4a9f8f1a9cb8122
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Tue, 16 Dec 2014 16:33:23 +0100

[README] Add table of contents (Closes #4458)

Diffstat:
MREADME.md | 14++++++++++++--
Mdevscripts/prepare_manpage.py | 15+++++++++++++--
2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md @@ -1,7 +1,15 @@ youtube-dl - download videos from youtube.com or other video platforms -# SYNOPSIS -**youtube-dl** [OPTIONS] URL [URL...] +- [INSTALLATION](#installation) +- [DESCRIPTION](#description) +- [OPTIONS](#options) +- [CONFIGURATION](#configuration) +- [OUTPUT TEMPLATE](#output-template) +- [VIDEO SELECTION](#video-selection) +- [FAQ](#faq) +- [DEVELOPER INSTRUCTIONS](#developer-instructions) +- [BUGS](#bugs) +- [COPYRIGHT](#copyright) # INSTALLATION @@ -34,6 +42,8 @@ YouTube.com and a few more sites. It requires the Python interpreter, version your Unix box, on Windows or on Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like. + youtube-dl [OPTIONS] URL [URL...] + # OPTIONS -h, --help print this help text and exit --version print program version and exit diff --git 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):