Mercurial > repos > bgruening > text_processing
comparison replace_text_in_line.xml @ 16:61b3b01662fd draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 5d3a6a822897569f22f288589543562f54482418
| author | bgruening |
|---|---|
| date | Fri, 01 Dec 2017 13:46:51 -0500 |
| parents | 7725ab6dab67 |
| children | f2918761eaf3 |
comparison
equal
deleted
inserted
replaced
| 15:74aae7d6cb09 | 16:61b3b01662fd |
|---|---|
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 1 <tool id="tp_replace_in_line" name="Replace Text" version="@BASE_VERSION@.0"> | 2 <tool id="tp_replace_in_line" name="Replace Text" version="@BASE_VERSION@.0"> |
| 2 <description>in entire line</description> | 3 <description>in entire line</description> |
| 3 <macros> | 4 <macros> |
| 4 <import>macros.xml</import> | 5 <import>macros.xml</import> |
| 5 </macros> | 6 </macros> |
| 6 <requirements> | 7 <requirements> |
| 7 <requirement type="package" version="4.2.3.dev0">sed</requirement> | 8 <requirement type="package" version="4.2.3.dev0">sed</requirement> |
| 8 </requirements> | 9 </requirements> |
| 9 <version_command>sed --version | head -n 1</version_command> | 10 <version_command>sed --version | head -n 1</version_command> |
| 10 <command> | 11 <command> |
| 12 <!-- | |
| 13 This looks quite strange but it is intentional. We have used U+0090 as | |
| 14 the replacement brackets in the sed expression. This meets multiple requirements for use: | |
| 15 | |
| 16 - is legal entity in XML 1.0 (https://en.wikipedia.org/wiki/Valid_characters_in_XML) | |
| 17 - is legal as a sed delimiter character (must be single-byte) | |
| 18 - is not in string.printable | |
| 19 | |
| 20 Thus, this should execute properly. Additionally it allows users to | |
| 21 use characters like '/' and '\' and '|' in their regex without them | |
| 22 being able to prematurely terminate the expression. | |
| 23 --> | |
| 11 <![CDATA[ | 24 <![CDATA[ |
| 12 sed | 25 sed |
| 13 -r | 26 -r |
| 14 --sandbox | 27 --sandbox |
| 15 "s/$find_pattern/$replace_pattern/g" | 28 's$find_pattern$replace_patterng' |
| 16 "$infile" | 29 '$infile' |
| 17 > "$outfile" | 30 > '$outfile' |
| 18 ]]> | 31 ]]> |
| 19 </command> | 32 </command> |
| 20 <inputs> | 33 <inputs> |
| 21 <param format="txt" name="infile" type="data" label="File to process" /> | 34 <param format="txt" name="infile" type="data" label="File to process" /> |
| 22 <param name="find_pattern" type="text" label="Find pattern" help="Use simple text, or a valid regular expression (without backslashes // ) " > | 35 <param name="find_pattern" type="text" label="Find pattern" help="Use simple text, or a valid regular expression (without backslashes // ) " > |
