#!/usr/bin/env python3 # Builds test_report/index.html from the screenshots and test_report/captions.txt # (one line per screenshot: NAME | caption), plus test_report/feature_check.txt. import html, os os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'test_report')) captions = {} if os.path.exists('captions.txt'): for line in open('captions.txt'): if '|' in line: name, text = line.split('|', 1) captions[name.strip()] = text.strip() names = sorted(f[:-4] for f in os.listdir('.') if f.endswith('.png')) order = [n for n in captions if n in names] + [n for n in names if n not in captions] out = ['
%s
' % html.escape(open('intro.txt').read().strip())) if os.path.exists('technotes_check.txt'): out.append('%s' % html.escape(open('technotes_check.txt').read())) if os.path.exists('feature_check.txt'): out.append('
%s' % html.escape(open('feature_check.txt').read())) out.append('
