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