$target contains attributes
Tim TimeWaster <tim-wqQJVv9kxZ/[email protected]> Sat, 19 Jun 2004 20:51:40 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Hi fellow a-a-p users,
I have encountered a little problem when making a web page publishing recipe.
I have the following recipe (stripped):
------------
:rule target/%: {buildcheck = $commands $MenuItems} templates/%.tpl
:print $target
:python
from GWS.Templater import *
t = TaptuTemplater(source_list[0])
_no.setAapVars(t)
t.setVar("title","Some title")
print _no.target
_no.outputToFile(t,_no.target)
Pages = `[ "target/%s.html" % i for i in expand2list(MenuItems)]` target/1.html target/2.html
Files = target/index.html target/style.css $Pages
all: $Files
:attr { publish = scp://[email protected]//zzz/%file% } $Files
---------------
If I run the recipe, it gives the following output:
target/index.html{publish=scp://[email protected]//zzz/%file%}
target/index.html{publish=scp://[email protected]//zzz/%file%}
Aap: Error in recipe "/some/path/main.aap" line 56: IOError: [Errno 2] No such file or directory: 'target/index.html{publish=scp://[email protected]//zzz/%file%}'
Clearly, the $target variable contains the attribute in its string. Is there a
Python function to remove this, or another variable that can be used instead,
such as $target_path ?
My aap version is:
A-A-P recipe executive version 1.063; released 2004 Apr 19 08:51:41 GMT
Tim
--
Zen Microsystems: we're the om in .commmmmmmmm...
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND