Repeat subfilter suggestion

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Repeat subfilter suggestion

Postby DFH » Thu May 02, 2013 2:45 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Postby DataMystic Support » Mon May 06, 2013 10:14 pm

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

(pattern){3,}

for 3 or more copies of pattern?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Postby DFH » Tue May 07, 2013 3:24 am

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

Re: Repeat subfilter suggestion

Postby DFH » Tue May 07, 2013 3:26 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Postby DataMystic Support » Fri May 31, 2013 4:00 pm

Hi David - we're adding this to v9.5 now ready for the next release.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Postby DFH » Thu Jun 06, 2013 12:22 am

Thanks!

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Postby DFH » Mon Jul 15, 2013 7:20 am

Not in TextPipe Standard.png
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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Postby DataMystic Support » Mon Jul 15, 2013 12:38 pm

Woops! Sorry - that will be fixed in the next few days.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Repeat subfilter suggestion

Postby DFH » Fri Jul 19, 2013 2:14 am

Fixed in version 9.5.1 just installed. Thanks.

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Repeat subfilter suggestion

Postby DataMystic Support » Fri Jul 19, 2013 2:18 pm

No problem! Thanks for the suggestion.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 1 guest