mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-14 07:37:25 +08:00
[doc] Using hardcoded README.md again
This commit is contained in:
parent
0f0a3764c3
commit
c1668ca07d
5
Makefile
5
Makefile
@ -61,8 +61,7 @@ youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
|
||||
chmod a+x youtube-dl
|
||||
|
||||
README.md: youtube_dl/*.py youtube_dl/*/*.py
|
||||
COLUMNS=80 python youtube_dl/__main__.py --help | python devscripts/make_readme.py README.md > README.new.md
|
||||
mv -f README.new.md README.md
|
||||
COLUMNS=80 python youtube_dl/__main__.py --help | python devscripts/make_readme.py
|
||||
|
||||
CONTRIBUTING.md: README.md
|
||||
python devscripts/make_contributing.py README.md CONTRIBUTING.md
|
||||
@ -74,7 +73,7 @@ README.txt: README.md
|
||||
pandoc -f markdown -t plain README.md -o README.txt
|
||||
|
||||
youtube-dl.1: README.md
|
||||
python devscripts/prepare_manpage.py README.md > youtube-dl.1.temp.md
|
||||
python devscripts/prepare_manpage.py >youtube-dl.1.temp.md
|
||||
pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
|
||||
rm -f youtube-dl.1.temp.md
|
||||
|
||||
|
@ -4,7 +4,7 @@ import io
|
||||
import sys
|
||||
import re
|
||||
|
||||
README_FILE = sys.argv[1]
|
||||
README_FILE = 'README.md'
|
||||
helptext = sys.stdin.read()
|
||||
|
||||
if isinstance(helptext, bytes):
|
||||
@ -20,7 +20,7 @@ options = helptext[helptext.index(' General Options:') + 19:]
|
||||
options = re.sub(r'(?m)^ (\w.+)$', r'## \1', options)
|
||||
options = '# OPTIONS\n' + options + '\n'
|
||||
|
||||
with io.open(sys.stdout.fileno(), 'w', encoding='utf-8') as f:
|
||||
with io.open(README_FILE, 'w', encoding='utf-8') as f:
|
||||
f.write(header)
|
||||
f.write(options)
|
||||
f.write(footer)
|
||||
|
@ -6,7 +6,7 @@ import sys
|
||||
import re
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
README_FILE = os.path.join(ROOT_DIR, sys.argv[1])
|
||||
README_FILE = os.path.join(ROOT_DIR, 'README.md')
|
||||
|
||||
|
||||
def filter_options(readme):
|
||||
|
Loading…
x
Reference in New Issue
Block a user