]>
jfr.im git - yt-dlp.git/blob - devscripts/make_issue_template.py
2 from __future__
import unicode_literals
10 parser
= optparse
.OptionParser(usage
='%prog FILE')
11 options
, args
= parser
.parse_args()
13 parser
.error('Expected an filename')
15 with io
.open(args
[0], encoding
='utf-8') as inf
:
16 issue_template_text
= inf
.read()
18 # Get the version from youtube_dl/version.py without importing the package
19 exec(compile(open('youtube_dl/version.py').read(),
20 'youtube_dl/version.py', 'exec'))
22 issue_template_text
= re
.sub(
23 r
'(?<=\*\*)(?P<version>[0-9\.]+)(?=\*\*)',
28 with io
.open(args
[0], 'w', encoding
='utf-8') as outf
:
29 outf
.write(issue_template_text
)
31 if __name__
== '__main__':