Repository 'tool_factory_2'
hg clone https://toolshed.g2.bx.psu.edu/repos/fubar/tool_factory_2

Changeset 7:61381bad936d (2015-01-12)
Previous changeset 6:81198714ac8e (2015-01-11) Next changeset 8:9d58cc32a12d (2015-01-12)
Commit message:
Uploaded
modified:
rgToolFactory2.py
tool_dependencies.xml
b
diff -r 81198714ac8e -r 61381bad936d rgToolFactory2.py
--- a/rgToolFactory2.py Sun Jan 11 23:34:39 2015 -0500
+++ b/rgToolFactory2.py Mon Jan 12 05:01:29 2015 -0500
[
@@ -145,11 +145,16 @@
      "<": "&lt;",
      "$": "\$"
      }
-
+html_unescape_table = dict(zip(html_escape_table.values(),html_escape_table.keys()))
 def html_escape(text):
      """Produce entities within text."""
      return "".join(html_escape_table.get(c,c) for c in text)
 
+
+def html_unescape(text):
+     """Revert entities within text."""
+     return "".join(html_unescape_table.get(c,c) for c in text)
+     
 def cmd_exists(cmd):
      return subprocess.call("type " + cmd, shell=True, 
            stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
@@ -245,8 +250,10 @@
                 a('--OUTPATH "%s"' % self.opts.output_tab) 
             for p in opts.additional_parameters:
                 p = p.replace('"','')
-                ps = p.split(',')
-                a('%s="%s"' % (ps[0],ps[1]))
+                psplit = p.split(',')
+                param = html_unescape(psplit[0])
+                value = html_unescape(psplit[1])
+                a('%s="%s"' % (param,value))
         if (self.opts.interpreter == 'Rscript'):
             # pass params on command line
             if self.opts.input_tab:
@@ -256,8 +263,10 @@
                 a('OUTPATH="%s"' % self.opts.output_tab) 
             for p in opts.additional_parameters:
                 p = p.replace('"','')
-                ps = p.split(',')
-                a('%s="%s"' % (ps[0],ps[1]))
+                psplit = p.split(',')
+                param = html_unescape(psplit[0])
+                value = html_unescape(psplit[1])
+                a('%s="%s"' % (param,value))
         if (self.opts.interpreter == 'perl'):
             # pass params on command line
             if self.opts.input_tab:
@@ -267,9 +276,9 @@
                 a('%s' % self.opts.output_tab)
             for p in opts.additional_parameters:
                 p = p.replace('"','')
-                ps = p.split(',')
-                param = ps[0]
-                value = ps[1]
+                psplit = p.split(',')
+                param = html_unescape(psplit[0])
+                value = html_unescape(psplit[1])
                 if (value.find(' ') <> -1):
                     a('%s="%s"' % (param,value))
                 else:
@@ -285,16 +294,16 @@
                   a('OUTPATH=%s' % (self.opts.output_tab))
               # sets those environment variables for the script
               # additional params appear in CL - yes, it's confusing
-              for i,param in enumerate(opts.additional_parameters):
-                  psplit = param.split(',')
-                  n = psplit[0]
-                  v = psplit[1]
-                  if (v.find(' ') <> -1):
-                    a('%s="%s"' % (n,v))
-                    self.cl.insert(4+i,'%s="%s"' % (n,v))
+              for i,p in enumerate(opts.additional_parameters):
+                  psplit = p.split(',')
+                  param = html_unescape(psplit[0])
+                  value = html_unescape(psplit[1])
+                  if (value.find(' ') <> -1):
+                    a('%s="%s"' % (param,value))
+                    self.cl.insert(4+i,'%s="%s"' % (param,value))
                   else:
-                    a('%s=%s' % (n,v))
-                    self.cl.insert(4+i,'%s=%s' % (n,v))
+                    a('%s=%s' % (param,value))
+                    self.cl.insert(4+i,'%s=%s' % (param,value))
 
 
         self.outFormats = opts.output_format
b
diff -r 81198714ac8e -r 61381bad936d tool_dependencies.xml
--- a/tool_dependencies.xml Sun Jan 11 23:34:39 2015 -0500
+++ b/tool_dependencies.xml Mon Jan 12 05:01:29 2015 -0500
b
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="ghostscript" version="9.10">
-        <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu/" />
+        <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
     <package name="graphicsmagick" version="1.3.20">
-        <repository changeset_revision="d87c457bbbc2" name="package_graphicsmagick_1_3_20" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu/" />
+        <repository changeset_revision="d87c457bbbc2" name="package_graphicsmagick_1_3_20" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
         <readme>
             Only Admins can use this tool generator but please do NOT install on a public facing Galaxy as it exposes unrestricted scripting as your Galaxy user