question: aap modules for building websites

Tim Hemel <[email protected]> Sun, 18 Apr 2004 16:11:36 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Hi all,

Since I thought it was about time to make a new homepage, I thought it would
be a nice exercise to use aap for this in combination with some Python
templating tools that I wrote. Unfortunately I keep getting confused when
reading the manuals: which approach is the nicest one?

I lay out the source for my website as follows:

# web page generating code
main.aap
Templater.py
# data for a blog like page
data/Notes/001.html
data/Notes/002.html
# photo albums
data/Photos/index.txt
data/Photos/1.jpg
data/Photos/2.jpg
data/Photos/Album/index.txt
data/Photos/Album/me.jpg

Now, of course I can make an aap recipe that works for this situation, but
it would be so much nicer if this can be put into an aap module.
Then, someone could for example use this:

:import blog
:attr { filetype = blog } data/Notes

:import album
:attr { filetype = album } data/Photos

or something that is just as short and readable. However, I get extremely
confused because I can use :route, :rule, :action, :totype, :produce, :import,
etc. I somehow fail to see how it all interrelates.

The first question is: does anybody have a suggestion on how to best do this
with aap?

Second question: I have of course already tried to find a solution myself.
In the above example I tried to give the source files a filetype, and I can
come up with some :route commands to convert this type into HTML, but that
does not seem to work. It complains that filetype blog does not exist. Reading
the manual says that the :filetype command needs to have a certain pattern or
a suffix to recognize the filetype, but that is the whole point, there is no
such rule, the user has to specify that.


Tim

-- 
Zen Microsystems: we're the om in .commmmmmmmm...


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click