annotate create_index.py @ 0:98c6e970cbc1 draft

Uploaded
author bgruening
date Thu, 22 Aug 2013 08:07:13 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
1 #!/usr/bin/env python
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
2
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
3 import os
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
4 import sys
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
5
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
6 o = open( sys.argv[1], 'w+' )
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
7
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
8
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
9 o.write('<html> <body> <h1> InterProScan result summary page </h1> <ul>' )
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
10
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
11 for filename in [f for f in os.listdir( sys.argv[2] ) if os.path.isfile( os.path.join( sys.argv[2], f) )]:
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
12 o.write( '<li><a href="%s"> %s </a></li>' % ( filename, os.path.splitext( filename )[0] ) )
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
13
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
14 o.write( '</ul></body></html>' )
98c6e970cbc1 Uploaded
bgruening
parents:
diff changeset
15 o.close()