7 parser
= optparse
.OptionParser(usage
='%prog INFILE OUTFILE')
8 options
, args
= parser
.parse_args()
10 parser
.error('Expected an input and an output filename')
12 infile
, outfile
= args
14 with open(infile
, encoding
='utf-8') as inf
:
15 issue_template_tmpl
= inf
.read()
17 # Get the version from yt_dlp/version.py without importing the package
18 exec(compile(open('yt_dlp/version.py').read(),
19 'yt_dlp/version.py', 'exec'))
21 out
= issue_template_tmpl
% {'version': locals()['__version__']}
23 with open(outfile
, 'w', encoding
='utf-8') as outf
:
27 if __name__
== '__main__':