Mercurial > repos > ganjoo > webservice_toolsuite
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d5cd409b8a18 |
---|---|
1 import os | |
2 | |
3 galaxyhome=os.environ.get('GALAXY_HOME') | |
4 | |
5 f1=open(galaxyhome+'/tool_conf.xml','r') | |
6 f1.seek(0,0) | |
7 | |
8 f3=open(galaxyhome+'/tools/WebServiceToolWorkflow/DeleteTool2.xml','w') | |
9 f3.seek(0,0) | |
10 | |
11 f3.write('<tool id="DeleteTool3" name="Step 2">\n') | |
12 f3.write(' <description> :Choose Web Service Tool to be deleted </description>\n') | |
13 | |
14 f3.write(' <command interpreter="python">\n DeleteTool2.py \n'+' $output \n $tool \n </command>\n') | |
15 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') | |
16 | |
17 | |
18 ##first copy everything upto WebServiceTool1.xml into another file f2 | |
19 line = f1.readline() | |
20 lineStripped=line.lstrip() | |
21 | |
22 while not lineStripped == '<section name="Web Service Tools" id="WebServices">\n': | |
23 line = f1.readline() | |
24 lineStripped = line.lstrip() | |
25 else: | |
26 print line | |
27 | |
28 i=0 | |
29 while not lineStripped == '</section>\n': | |
30 i=i+1 | |
31 line = f1.readline() | |
32 lineStripped = line.lstrip() | |
33 else: | |
34 print line | |
35 | |
36 j=0 | |
37 while not j==i-1: | |
38 j=j+1 | |
39 f3.write(' <option value = "client_'+ str(j) + '.xml"> Web Service Tools: Tool '+ str(j) + '</option>\n') | |
40 else: | |
41 print i | |
42 | |
43 f3.write(' </param>\n </inputs>\n') | |
44 f3.write(' <outputs>\n <data format="tabular" name="output" />\n </outputs>\n') | |
45 f3.write(' <help>\n </help>\n</tool>') | |
46 |