# HG changeset patch # User fubar # Date 1395573167 14400 # Node ID 903e3748f73500c461da24e298406427c7812f2e # Parent e052aadae3e9aca3bcd28c07145cd5ee3ada6232 removed dependencies diff -r e052aadae3e9 -r 903e3748f735 rgToolFactory.py --- a/rgToolFactory.py Thu Mar 20 06:18:54 2014 -0400 +++ b/rgToolFactory.py Sun Mar 23 07:12:47 2014 -0400 @@ -157,6 +157,7 @@ self.xmlfile = '%s.xml' % self.toolname s = open(self.opts.script_path,'r').readlines() s = [x.rstrip() for x in s] # remove pesky dos line endings if needed + s = [x.lstrip() for x in s] # and left padding self.script = '\n'.join(s) fhandle,self.sfile = tempfile.mkstemp(prefix=self.toolname,suffix=".%s" % (opts.interpreter)) tscript = open(self.sfile,'w') # use self.sfile as script source for Popen @@ -254,7 +255,9 @@ %(tooltests)s + %(help)s + """ # needs a dict with toolname, toolid, interpreter, scriptname, command, inputs as a multi line string ready to write, outputs ditto, help ditto @@ -300,8 +303,9 @@ # but requires escaping of <, > and $ to avoid Mako parsing if self.opts.help_text: xdict['help'] = open(self.opts.help_text,'r').read() + xdict['help'] = '\n'.join([x.lstrip(x) for x in xdict['help']]) else: - xdict['help'] = 'Please ask the tool author for help as none was supplied at tool generation' + xdict['help'] = 'Please ask the tool author for help as none was supplied at tool generation\n' coda = ['**Script**','Pressing execute will run the following code over your input file and generate some outputs in your history::'] coda.append(self.indentedScript) coda.append('**Attribution** This Galaxy tool was created by %s at %s\nusing the Galaxy Tool Factory.' % (self.opts.user_email,timenow()))