Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
webpageize.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 import os
3 import sys
4 index=0
5 fp=0
6 def makeWebPage(fp,index):
7  if (fp):
8  fp.write("\n</body>\n</html>\n");
9  fp.close();
10  fp = open (str(index/10)+".html","w")
11  fp.write('<html>\n<head>\n<title>Pictures from Hong Kong</title>\n</head>\n<body vlink="#001e73" link="#001e73" bgcolor="#ffffff" text="#000000">\n');
12  return fp
13 
14 for args in sys.argv:
15  print (args)
16  if (index%20==0):
17  fp = makeWebPage(fp,index);
18  index+=1
19  if (index==1):
20  continue
21  os.system("xview -zoom 50 "+args+" &")
22  first = sys.stdin.readline()
23  if (first=="x\n"):
24  continue
25  second= sys.stdin.readline()
26  fp.write('<br><br><b>\n'+first+'</b>')
27  fp.write('<br><img src="'+args+'" width="1024"/>')
28  fp.write("<br>"+second+"<br>")
29