# HG changeset patch # User greg # Date 1507816365 14400 # Node ID 1a216a9837c7248c862ebc647d6c3227e5e18c8a # Parent 32382b0d5add104a51d517512825c94068043559 Uploaded diff -r 32382b0d5add -r 1a216a9837c7 utils.py --- a/utils.py Thu Oct 12 09:52:27 2017 -0400 +++ b/utils.py Thu Oct 12 09:52:45 2017 -0400 @@ -54,29 +54,3 @@ def stop_err(msg): sys.exit(msg) - - -def write_html_output(output, title, dir): - with open(output, 'w') as fh: - dir_items = sorted(os.listdir(dir)) - # Directories can only contain either files or directories, - # but not both. - if len(dir_items) > 0: - item_path = os.path.join(dir, dir_items[0]) - if os.path.isdir(item_path): - header = 'Directories' - else: - header = 'Datasets' - else: - header = '' - fh.write('

%s: %d items

\n' % (title, len(dir_items))) - fh.write('

\n') - fh.write('%s\n' % header) - for index, fname in enumerate(dir_items): - if index % 2 == 0: - bgcolor = '#D8D8D8' - else: - bgcolor = '#FFFFFF' - link = '%s\n' % (fname, fname) - fh.write('\n' % (bgcolor, link)) - fh.write('
%s
\n')