I use the 'Secondary Output Filter' quit a bit. I perhaps have an idea for making it more powerful and would save me from running multiple processes in succession. So here goes
From what I understand, when using a ‘Secondary Output Filter’ the file it is writing to is locked 'open' until the all processing is completed and is then closed. Naturally this renders the file inaccessible to use later on for other processing. What if there was a check box within the 'Secondary Output Filter' called: “close file on exit of sub” (I am guessing this would have to be the immediate parent sub). This option would only be useful in a sub tree. What do you think? Good idea or bad
Could a new filter be created, called: 'Close Secondary Output Filter'. This filter could then be placed anywhere on the tree and would only close the previous 'one' 'Secondary Output Filter'? Just ideas
As far as possible, TextPipe processes the whole filter tree simultaneously, so your close filter would act straight after it had been opened. Just image that text is always flowing through every part of the filter tree and you'll see why this doesn't work.
So...do you know of a way to write to a file and turn around and use the newly written content all within one textpipe processing file?
I am not sure if others have this need...but I extract content, etc. and write it to a file. I then have to open another TextPipe file to access that file and continue forward, (I have about 8 processing steps that I do like this).
I do extract data and form that data into Regex and write them to a file and then open the next processing file, load the Regex's and continue. I guess if variables were allowed in the 'Find' boxes then I wouldn't have to do this. This is just one example. Variables in the 'Find' would be so powerful...but is it possible with the Regex's?
No - we don't allow variables in the regex to try and optimize performance. It could also become a huge mess with yet another set of escaping needed
\ for special chars such as $ . * ( ) ^ { } \ [ ] +
@@ for variables
- you get the idea.
Does your regex get generated for each file and then applied to the same file? Or is it generated once for a set of files, and then is applied to that set of files? An exmaple would be really helpful