Mercurial > repos > bgruening > text_processing
diff replace_text_in_line.xml @ 4:56e80527c482 draft
Uploaded
author | bgruening |
---|---|
date | Wed, 07 Jan 2015 11:10:52 -0500 |
parents | 7068d1548234 |
children | 8928e6d1e7ba |
line wrap: on
line diff
--- a/replace_text_in_line.xml Sun Oct 06 08:22:36 2013 -0400 +++ b/replace_text_in_line.xml Wed Jan 07 11:10:52 2015 -0500 @@ -1,16 +1,24 @@ -<tool id="tp_replace_in_line" name="Replace Text" version="0.1"> +<tool id="tp_replace_in_line" name="Replace Text" version="@BASE_VERSION@.0"> <description>in entire line</description> - <requirements> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"> <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement> - </requirements> - + </expand> + <version_command>sed --version | head -n 1</version_command> <command interpreter="sh"> - sed -r --sandbox "s/$find_pattern/$replace_pattern/g" "$input" > "$output" +<![CDATA[ + sed + -r + --sandbox + "s/$find_pattern/$replace_pattern/g" + "$input" + > "$output" +]]> </command> - <inputs> <param format="txt" name="input" type="data" label="File to process" /> - <param name="find_pattern" type="text" size="20" label="Find pattern" help="Use simple text, or a valid regular expression (without backslashes // ) " > <sanitizer> <valid initial="string.printable"> @@ -18,7 +26,6 @@ </valid> </sanitizer> </param> - <param name="replace_pattern" type="text" size="20" label="Replace with:" help="Use simple text, or & (ampersand) and \\1 \\2 \\3 to refer to matched text. See examples below." > <sanitizer> <valid initial="string.printable"> @@ -26,21 +33,20 @@ </valid> </sanitizer> </param> - </inputs> - <tests> - <test> - <param name="input" value="replace_text_in_line_in1.txt" ftype="tabular" /> - <output name="output" file="replace_text_in_line_output1.txt" /> - <param name="url_paste" value="CTC." /> - <param name="file_data" value="FOOBAR" /> - </test> - </tests> <outputs> <data format="input" name="output" metadata_source="input"/> </outputs> + <tests> + <test> + <param name="input" value="replace_text_in_line_in1.txt" /> + <param name="find_pattern" value="CTC." /> + <param name="replace_pattern" value="FOOBAR" /> + <output name="output" file="replace_text_in_line_output1.txt" /> + </test> + </tests> <help> - +<![CDATA[ **What it does** This tool performs find & replace operation on a specified file. @@ -124,5 +130,7 @@ **Note**: SED uses extended regular expression syntax, not Perl syntax. **\\d**, **\\w**, **\\s** etc. are **not** supported. +@REFERENCES@ +]]> </help> </tool>