ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Task to generate indexes
Date Tue, 26 Nov 2002 18:57:01 GMT
This might be overkill, but Cocoon could do this for you with its 
directory listing generator and some XSLT to turn that into HTML.  It 
would be a big job to learn Cocoon just for this task though.

The simplest approach would be to write a Java class that had an 
execute() method in it and use that as a custom Ant task.  You could 
then add setters for parameters you want to pass as attributes (like a 
directory, use as the setter type).  Then write the 
directory structure out as XML and then use <xslt> to turn that into HTML.

So I'm seconding your desired solution, unless you wanted to brave 
Cocoon's learning curve.

	Erik wrote:
> I want to generate an index html file for several thousand images.
> I already have the thumbnails images, so I just want to autogenerate the page using the
directory listing and some XSLs. What would be the
> recommend method for doing something like this? I've thought of a couple of ways:
> * an external program.
> * inline scripting (javascript? python?).
> * a JSP preprocessor.
> * custom XSLT extensions.
> * custom task to do the whole thing.
> * custom task to generate an XML file of a fileset listing, which is
>   then piped into the style task
> I'm partial to the last solution, since it's pretty reusable, but
> I thought I'd ask if anyone has done things like this before? Surely
> generating index pages of directories is a pretty common thing?
> Thanks,
> As an aside, this build script is for my graphic designer
> girlfriend. She doesn't know anything about command lines and
> really just wants a few icons to click run these automated tasks I'm
> building for her. Has anyone made a graphical front end for Ant
> which will simply pop up a window with a list of tasks and
> descriptions which can be launched?  Also, can Ant run on MacOS 9,
> or is it OSX only? 
> Thanks guys,
> - joshy
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message