diff WebServiceToolWorkflow/DeleteTool1.py~ @ 0:d5cd409b8a18 default tip

Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author ganjoo
date Tue, 07 Jun 2011 18:00:50 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/DeleteTool1.py~	Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,46 @@
+import os
+
+galaxyhome=os.environ.get('GALAXY_HOME')
+
+f1=open(galaxyhome+'/tool_conf.xml','r')
+f1.seek(0,0)
+
+f3=open(galaxyhome+'/tools/WebServiceToolWorkflow/DeleteTool2.xml','w')
+f3.seek(0,0)
+        
+f3.write('<tool id="DeleteTool3" name="Step 2">\n')
+f3.write('  <description> :Choose Web Service Tool to be deleted </description>\n')
+ 
+f3.write('  <command interpreter="python">\n  DeleteTool2.py \n'+'  $output \n  $tool \n </command>\n')
+f3.write('  <inputs>\n    <param name ="tool" type ="select" label =" Select the Web service tool you want to delete, by its order number (position in the Web Service Tools section on the left) " help="see tip below">\n')
+
+
+##first copy everything upto WebServiceTool1.xml into another file f2
+line = f1.readline()
+lineStripped=line.lstrip()
+
+while not lineStripped == '<section name="Web Service Tools" id="WebServices">\n':
+    line = f1.readline()
+    lineStripped = line.lstrip()
+else:
+    print line
+
+i=0
+while not lineStripped == '</section>\n':
+    i=i+1
+    line = f1.readline()
+    lineStripped = line.lstrip()
+else:
+    print line
+    
+j=0
+while not j==i-1:
+    j=j+1
+    f3.write('                  <option value = "client_'+ str(j) + '.xml"> Web Service Tools: Tool '+ str(j) + '</option>\n')
+else:
+   print i
+
+f3.write('        </param>\n  </inputs>\n')    
+f3.write('  <outputs>\n    <data format="tabular" name="output" />\n  </outputs>\n')
+f3.write('  <help>\n  </help>\n</tool>')
+