[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: feature query



* Denis Barbier (barbier@imacs.polytechnique.fr) wrote:
> On Sun, 28 May 2000, Tom Gilbert wrote:
> 
> > Sorry, me again. (so many questions).
> > 
> > Is it possible to import content from an external program during Pass
> > 1? I know I can import stuff using ePerl, but that stuff would have to
> > be pre-marked-up, as it wouldn't go through pass 2 (macro expansion).
> [...]
> > <verbatim>
> > #import `fortune`
> > </verbatim>
> 
> Good idea, i will implement it if there is no objection (with #include
> instead of #import).

Oh drat. I actually meant to type include (hence the example with a
normal .inc file). Not having a good day really :)

Anyway, thanks for considering it :)
 
> Note that you can do it yourself with the -P flag: 
>   wml -P ./wml-import.pl file.wml
> ---------------- wml-import.pl ----------------
> #!/usr/bin/perl
> while ($line = <>) {
>     if ($line =~ m|^#import `(.*)`$|) {
>         print qx/$1/;
>     } else {
>         print $line;
>     }
> }
> 1;
> ------------ end of wml-import.pl -------------

That's very cool. I'll do just that :-)

Thanks again.

Tom.
-- 
            .------------------------------------------------------.
    .^.     | Tom Gilbert, England | http://www.linuxbrit.co.uk    |
    /V\     |----------------------| gilbertt@linuxbrit.co.uk      |
   // \\    | Sites I recommend:   `-------------------------------|
  /(   )\   | www.freshmeat.net www.enlightenment.org slashdot.org |
   ^^-^^    `------------------------------------ vim: set tw=72: -'
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com