Repeat subfilter suggestion

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Repeat subfilter suggestion

Post 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.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Post by DataMystic Support »

Can you give me an example? How is this different from say

(pattern){3,}

for 3 or more copies of pattern?
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post 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
David
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post 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
       
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Post by DataMystic Support »

Hi David - we're adding this to v9.5 now ready for the next release.
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by dfhtextpipe »

Thanks!
David
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post 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.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Post by DataMystic Support »

Woops! Sorry - that will be fixed in the next few days.
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by dfhtextpipe »

Fixed in version 9.5.1 just installed. Thanks.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Post by DataMystic Support »

No problem! Thanks for the suggestion.
Post Reply