[pmwiki-users] FW: cookbook "ShellTools" (was: Include specific lines of text on a page)

Hans design5 at softflow.co.uk
Mon Jan 21 10:08:38 CST 2008


Monday, January 21, 2008, 3:27:38 PM, Peter & Melodye Bowers wrote:

> Maybe we're looking at two completely different functional specs and maybe
> what is needed is 2 different cookbooks.  Perhaps you could continue with
> the tool you've made great strides on already (preferably with a different
> name?) and if I can borrow from your foundation maybe I'll continue a slower
> development of a wiki-sh or shelltool cookbook...

I am happy to drop the 'grep' name for the MX.
'extract' may work? I don't want  along name.
We will see if these tools can be compatible for nesting purposes.


> In the version of tail I most recently submitted it demonstrates that you
> are not re-processing multiple files.  You are using the nesting
> functionality to process the files once (at the innermost level of the
> nesting) and then at each succeeding outer level of nesting you are only
> processing the OUTPUT of the next level inside...  Your "grep" already
> allows for multiple files using wildcards.  When I surrounded the "grep"
> call with "tail" it did not go and look at the files again -- it only looked
> at the matching lines which your "grep" returned...

> Let's say  [..snip..]

> Maybe I'm misunderstanding the concern about multiple page processing?  Or
> perhaps I didn't communicate clearly enough before how I envisioned the
> nesting was going to work...

I can see that you can process the grep with the tail.
But you can't process the tail with the grep, or?
grep expects some PageName(s) or PageName-wildcard pattern as input.
Internally with the lines= option grep can then restrict the input to
certain lines from each page source, before trying to match text
patterns etc.

Maybe this is good enough. Then I don't need to worry how to control
output line numbers in grep, since it could be done with the tail MX.
grep's output is controlled by the text pattern, an optional cut
pattern for lines, and a hide (will call this snip i think) pattern
for removing text fragments from lines. Does it need more?

To have grep accept another input apart from  a page list we will need
to follow Dominic's advise, and I'm afraid that gets too difficult for
me.



  ~Hans




More information about the pmwiki-users mailing list