2021-06-03 09:43:42 +00:00
|
|
|
#!/usr/bin/env python3
|
2014-12-12 15:42:40 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2020-09-03 03:38:02 +00:00
|
|
|
# import io
|
2014-12-15 23:22:38 +00:00
|
|
|
import optparse
|
2020-09-03 03:38:02 +00:00
|
|
|
# import re
|
2014-12-12 15:42:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2014-12-15 23:22:38 +00:00
|
|
|
parser = optparse.OptionParser(usage='%prog INFILE OUTFILE')
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
if len(args) != 2:
|
|
|
|
parser.error('Expected an input and an output filename')
|
2020-09-03 03:38:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
""" infile, outfile = args
|
2014-12-15 23:22:38 +00:00
|
|
|
|
|
|
|
with io.open(infile, encoding='utf-8') as inf:
|
2014-12-12 15:42:40 +00:00
|
|
|
readme = inf.read()
|
|
|
|
|
2020-09-03 03:38:02 +00:00
|
|
|
bug_text = re.search( """
|
|
|
|
# r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1)
|
|
|
|
# dev_text = re.search(
|
2021-02-24 18:45:56 +00:00
|
|
|
# r'(?s)(#\s*DEVELOPER INSTRUCTIONS.*?)#\s*EMBEDDING yt-dlp',
|
2020-09-03 03:38:02 +00:00
|
|
|
""" readme).group(1)
|
2014-12-12 15:42:40 +00:00
|
|
|
|
|
|
|
out = bug_text + dev_text
|
|
|
|
|
2014-12-15 23:22:38 +00:00
|
|
|
with io.open(outfile, 'w', encoding='utf-8') as outf:
|
2020-09-03 03:38:02 +00:00
|
|
|
outf.write(out) """
|
2016-11-17 11:42:56 +00:00
|
|
|
|
2014-12-12 15:42:40 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|