Page 1 of 1

Repeat subfilter suggestion

Posted: Thu May 02, 2013 2:45 am
by dfhtextpipe
A suggestion for an enhancement to TextPipe.

Repeat filter

This filter would repeat all subfilters N times in succession.

Advantages:
This would avoid having to paste numerous duplicate copies of a subfilter.
i.e. To cope with input patterns where [say] the number of repeat replacements may not be known in advance.

NB. This is not the same kind of situation as the existing Repeat file filter.

Re: Repeat subfilter suggestion

Posted: Mon May 06, 2013 10:14 pm
by DataMystic Support
Can you give me an example? How is this different from say

(pattern){3,}

for 3 or more copies of pattern?

Re: Repeat subfilter suggestion

Posted: Tue May 07, 2013 3:24 am
by dfhtextpipe
It's not patterns containing a specified number of repeats that I have described.

Rather it's for the same pattern, with the replacement applied a specified number of times.

The context I had in mind is when you need to move a line upwards to before various other lines,
the number of which might vary from place to place in the input files.

The need arose for me while moving chapter tags in USFM files to before various header tags.

david

Re: Repeat subfilter suggestion

Posted: Tue May 07, 2013 3:26 am
by dfhtextpipe
Example:

Code: Select all

Comment...
|  Move chapter tags
|  
|   - to before section headings
|   - restrict first line to not be one with a verse tag
|   - identical subfilter applied 4 times to cover Psalms (worst case)
|
|--Perl pattern [^\\v.+\r\n.+\r\n] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 4096
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [X] UTF-8 Support
|  |
|  +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
|        [X] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [ ] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [ ] '.' matches newline
|        [X] UTF-8 Support
|      
|--Perl pattern [^\\v.+\r\n.+\r\n] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 4096
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [X] UTF-8 Support
|  |
|  +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
|        [X] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [ ] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [ ] '.' matches newline
|        [X] UTF-8 Support
|      
|--Perl pattern [^\\v.+\r\n.+\r\n] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 4096
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [X] UTF-8 Support
|  |
|  +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
|        [X] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [ ] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [ ] '.' matches newline
|        [X] UTF-8 Support
|      
|--Perl pattern [^\\v.+\r\n.+\r\n] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 4096
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [X] UTF-8 Support
|  |
|  +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
|        [X] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [ ] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [ ] '.' matches newline
|        [X] UTF-8 Support
|      
|--Perl pattern [^\\v.+\r\n.+\r\n] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 4096
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [X] UTF-8 Support
|  |
|  +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
|        [X] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [ ] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [ ] '.' matches newline
|        [X] UTF-8 Support
|      
+--Perl pattern [^\\v.+\r\n.+\r\n] with []
   |  [X] Match case
   |  [ ] Whole words only
   |  [ ] Case sensitive replace
   |  [ ] Prompt on replace
   |  [ ] Skip prompt if identical
   |  [ ] First only
   |  [ ] Extract matches
   |  Maximum text buffer size 4096
   |  [ ] Maximum match (greedy)
   |  [ ] Allow comments
   |  [ ] '.' matches newline
   |  [X] UTF-8 Support
   |
   +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
         [X] Match case
         [ ] Whole words only
         [ ] Case sensitive replace
         [ ] Prompt on replace
         [ ] Skip prompt if identical
         [ ] First only
         [ ] Extract matches
         Maximum text buffer size 4096
         [ ] Maximum match (greedy)
         [ ] Allow comments
         [ ] '.' matches newline
         [X] UTF-8 Support
       

Re: Repeat subfilter suggestion

Posted: Fri May 31, 2013 4:00 pm
by DataMystic Support
Hi David - we're adding this to v9.5 now ready for the next release.

Re: Repeat subfilter suggestion

Posted: Thu Jun 06, 2013 12:22 am
by dfhtextpipe
Thanks!

Re: Repeat subfilter suggestion

Posted: Mon Jul 15, 2013 7:20 am
by dfhtextpipe
New feature not available!
New feature not available!
The filter cannot be used in TextPipe Standard edition, even though it was I who requested the feature.

Re: Repeat subfilter suggestion

Posted: Mon Jul 15, 2013 12:38 pm
by DataMystic Support
Woops! Sorry - that will be fixed in the next few days.

Re: Repeat subfilter suggestion

Posted: Fri Jul 19, 2013 2:14 am
by dfhtextpipe
Fixed in version 9.5.1 just installed. Thanks.

Re: Repeat subfilter suggestion

Posted: Fri Jul 19, 2013 2:18 pm
by DataMystic Support
No problem! Thanks for the suggestion.