]> jfr.im git - yt-dlp.git/blame - devscripts/make_contributing.py
[extractor] Common function `_match_valid_url`
[yt-dlp.git] / devscripts / make_contributing.py
CommitLineData
cc52de43 1#!/usr/bin/env python3
e56190b3
PH
2from __future__ import unicode_literals
3
139cb942 4# import io
ccbfaa83 5import optparse
139cb942 6# import re
e56190b3
PH
7
8
9def main():
ccbfaa83
PH
10 parser = optparse.OptionParser(usage='%prog INFILE OUTFILE')
11 options, args = parser.parse_args()
12 if len(args) != 2:
13 parser.error('Expected an input and an output filename')
139cb942
U
14
15
16""" infile, outfile = args
ccbfaa83
PH
17
18 with io.open(infile, encoding='utf-8') as inf:
e56190b3
PH
19 readme = inf.read()
20
139cb942
U
21 bug_text = re.search( """
22# r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1)
23# dev_text = re.search(
7a5c1cfe 24# r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING yt-dlp',
139cb942 25""" readme).group(1)
e56190b3
PH
26
27 out = bug_text + dev_text
28
ccbfaa83 29 with io.open(outfile, 'w', encoding='utf-8') as outf:
139cb942 30 outf.write(out) """
582be358 31
e56190b3
PH
32if __name__ == '__main__':
33 main()