Mercurial > repos > sanbi-uwc > vcf2neo
diff write_db_summary.py @ 0:3e14eda348d3 draft default tip
planemo upload for repository https://github.com/sanbi-sa/tools-sanbi-uwc commit 0245b4efed8ced6d06d76f1249a47d2178285385
author | sanbi-uwc |
---|---|
date | Mon, 19 Jun 2017 00:08:18 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/write_db_summary.py Mon Jun 19 00:08:18 2017 -0400 @@ -0,0 +1,27 @@ +#!/usr/bin/env python +from __future__ import print_function + +import argparse +import os +import os.path + +parser = argparse.ArgumentParser( + description="Write HTML summary from neostore datatype") +parser.add_argument('basepath') +parser.add_argument('label') + +args = parser.parse_args() + +output = """<html><head><title>Files for Composite Dataset ({})</title></head> + <p/>This composite dataset is composed of + the following files:<p/><ul>\n""".format(args.label) +db_path = args.basepath + '/neo4jdb/databases/graph.db' +for filename in os.listdir(db_path): + if filename.startswith('.'): + continue + path = db_path + '/' + filename + if os.path.isdir(path): + continue + output += "<li>{}</li>\n".format(filename) +output += '</ul></html>\b' +print(output)