mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-05 20:41:47 -07:00
[build] Extend use of devscripts/utils
This commit is contained in:
parent
a25e9f3c84
commit
b870181229
15 changed files with 99 additions and 74 deletions
|
@ -1,9 +1,13 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import io
|
||||
import sys
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
dirn = os.path.dirname
|
||||
|
||||
sys.path.insert(0, dirn(dirn(os.path.abspath(__file__))))
|
||||
|
||||
from utils import read_file
|
||||
from youtube_dl.compat import compat_open as open
|
||||
|
||||
README_FILE = 'README.md'
|
||||
|
@ -12,8 +16,7 @@ helptext = sys.stdin.read()
|
|||
if isinstance(helptext, bytes):
|
||||
helptext = helptext.decode('utf-8')
|
||||
|
||||
with io.open(README_FILE, encoding='utf-8') as f:
|
||||
oldreadme = f.read()
|
||||
oldreadme = read_file(README_FILE)
|
||||
|
||||
header = oldreadme[:oldreadme.index('# OPTIONS')]
|
||||
footer = oldreadme[oldreadme.index('# CONFIGURATION'):]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue