Mercurial > repos > sanbi-uwc > vcf2neo
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e14eda348d3 |
---|---|
1 #!/usr/bin/env python | |
2 from __future__ import print_function | |
3 | |
4 import argparse | |
5 import os | |
6 import os.path | |
7 | |
8 parser = argparse.ArgumentParser( | |
9 description="Write HTML summary from neostore datatype") | |
10 parser.add_argument('basepath') | |
11 parser.add_argument('label') | |
12 | |
13 args = parser.parse_args() | |
14 | |
15 output = """<html><head><title>Files for Composite Dataset ({})</title></head> | |
16 <p/>This composite dataset is composed of | |
17 the following files:<p/><ul>\n""".format(args.label) | |
18 db_path = args.basepath + '/neo4jdb/databases/graph.db' | |
19 for filename in os.listdir(db_path): | |
20 if filename.startswith('.'): | |
21 continue | |
22 path = db_path + '/' + filename | |
23 if os.path.isdir(path): | |
24 continue | |
25 output += "<li>{}</li>\n".format(filename) | |
26 output += '</ul></html>\b' | |
27 print(output) |