ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phill Tornroth <ptorn...@BridgeMedical.com>
Subject RE: Task to generate indexes
Date Tue, 26 Nov 2002 19:51:26 GMT
If I'm reading this right, I just did this. I wrote a task that takes some
arguments (file types, directory sorta stuff) and dumps an XML file
describing what it found. I then use XSLT to build an html table of
contents.

Anyone who wants the code can email me and I'll send it.

-phill

-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
Sent: Tuesday, November 26, 2002 10:57 AM
To: Ant Users List
Subject: Re: Task to generate indexes


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 java.io.File 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


joshy@joshy.org 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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message