]> jfr.im git - yt-dlp.git/blob - devscripts/make_contributing.py
[devscripts/run_tests] Use markers to filter tests (#1258)
[yt-dlp.git] / devscripts / make_contributing.py
1 #!/usr/bin/env python3
2 from __future__ import unicode_literals
3
4 import io
5 import optparse
6 import re
7
8
9 def main():
10 return # This is unused in yt-dlp
11
12 parser = optparse.OptionParser(usage='%prog INFILE OUTFILE')
13 options, args = parser.parse_args()
14 if len(args) != 2:
15 parser.error('Expected an input and an output filename')
16
17 infile, outfile = args
18
19 with io.open(infile, encoding='utf-8') as inf:
20 readme = inf.read()
21
22 bug_text = re.search(
23 r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1)
24 dev_text = re.search(
25 r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING yt-dlp', readme).group(1)
26
27 out = bug_text + dev_text
28
29 with io.open(outfile, 'w', encoding='utf-8') as outf:
30 outf.write(out)
31
32
33 if __name__ == '__main__':
34 main()