mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-05 05:22:48 -05:00
[build] Extend use of devscripts/utils
This commit is contained in:
@ -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'):]
|
||||
|
Reference in New Issue
Block a user