import re, shutil, os, csv os.makedirs('output/original_submission', exist_ok=True) for f in ['handoff.md','requirements.csv','check.py']: dst='output/original_submission/'+f if not os.path.exists(dst): shutil.copy('output/'+f, dst) a=open('inputs/archive.md',encoding='utf-8').read() heads=re.findall(r'^## (\S+) — (October\d+) — (.*)$',a,re.M) print('records',len(heads)) print('non-NOTE',[h for h in heads if not h[0].startswith('NOTE')]) notes=re.split(r'^## ',a,flags=re.M) nn=[n for n in notes if n.startswith('NOTE')] phr=['No production approval was granted','Atlas Mobile','instant sync','internal demo','preserve existing customer data'] for p in phr: print(p, sum(p in n for n in nn), 'of', len(nn)) print('migration mentions',[l for l in a.splitlines() if 'migration' in l]) print('signoff mentions',[l for l in a.splitlines() if 'signoff' in l.lower()]) tickets=sorted(set(re.findall(r'AT-\d+',a))); print(tickets[0],tickets[-1],len(tickets))