[galaxy-dev] Custom Cheetah filters?

2013-02-12 Thread Smithies, Russell
I want to add a filter to strip whitespace and newlines from a text input box 
so I can pipe the sanitized string to a command.
Documentation is a bit sparse (and my Python a bit basic) so does anyone have 
an example?
Perhaps there's a better way of doing it - regex maybe?

Any ideas?

Thanx,

--Russell
--


===
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
===
___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] Custom Cheetah filters?

2013-02-12 Thread Björn Grüning
Hi Russell,

also keep in mind, that Cheetah is just python. Maybe you can try to do
something like that:

$text.strip() or str($text).strip()

Cheers,
Bjoern

 I want to add a filter to strip whitespace and newlines from a text
 input box so I can pipe the sanitized string to a command.
 
 Documentation is a bit sparse (and my Python a bit basic) so does
 anyone have an example?
 
 Perhaps there’s a better way of doing it – regex maybe?
 
  
 
 Any ideas?
 
  
 
 Thanx,
 
  
 
 --Russell
 
 -- 
 
  
 
 
 
 ===
 Attention: The information contained in this message and/or
 attachments
 from AgResearch Limited is intended only for the persons or entities
 to which it is addressed and may contain confidential and/or
 privileged
 material. Any review, retransmission, dissemination or other use of,
 or
 taking of any action in reliance upon, this information by persons or
 entities other than the intended recipients is prohibited by
 AgResearch
 Limited. If you have received this message in error, please notify the
 sender immediately.
 ===
 ___
 Please keep all replies on the list by using reply all
 in your mail client.  To manage your subscriptions to this
 and other Galaxy lists, please use the interface at:
 
   http://lists.bx.psu.edu/


___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/