Re: exclusion in file patterns
Tim Hemel <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Sep 12, 2003 at 10:19:42AM +0200, Tim Hemel wrote:
> On Thu, Sep 11, 2003 at 05:51:40PM +0200, Bram Moolenaar wrote:
> The problem with the tree command is that when I use my filespec as an argument
> to certain actions, I have to use a separate :tree command. That forces me
> to express myself in terms of commands, instead of thinking in terms of
> filespecs.
> If I could make a filespec that gets all files in a directory recursively, and
> where I can exclude certain files, that would be a lot nicer. It's not hard
> to write the Python code to get these files, but how would one express it in
> aap syntax?
>
> FILES = tree("www/*",exclude="CVS,AAPDIR,*.bak")
>
Hmm, that can be generalized to
VAR = @PY-FUNC(...)
Is it possible to assign the result of a Python function to an aap variable?
If it is not possible, then perhaps the pattern syntax can be extended as
follows (a bit like how teTeX does it):
www// (all files below www)
www//css (all css dirs below www, note that this differs from www/*/css!)
www//*.php (all php files)
Then, I can use an extra attribute with the publish action, such as
{ publish_exclude = CVS } or
{ publish_exclude = $FILES_THAT_ARE_NOT_IMPORTANT }
to make publish skip certain files.
Tim
--
Zen Microsystems: we're the om in .commmmmmmmm...
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf