comparison write_db_summary.py @ 0:35bcefc9176b draft default tip

planemo upload for repository https://github.com/sanbi-sa/tools-sanbi-uwc commit dbd9af1e941e35ec9ca2a9f75af02edea67a5981
author sanbi-uwc
date Thu, 15 Jun 2017 07:41:38 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:35bcefc9176b
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)