Repeat subfilter suggestion

Get help with installation and running here.

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

Post Reply
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Repeat subfilter suggestion

Post by DFH »

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.
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?
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by DFH »

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
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by DFH »

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
       
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.
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by DFH »

Thanks!
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by DFH »

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.
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.
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
DFH
Posts: 976
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Post by DFH »

Fixed in version 9.5.1 just installed. Thanks.
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.
Regards,

Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Post Reply