> I use eclipse and ant for build an application (EAR). So I'd like to
> generate a readme file constituted by comments of several sources code.
>
> Ideally I'd like to put two spéchfic flags in source file and keep only
> the text between those flags. I looked around FilterChain and
> FilterReader ant tasks, but I can not find a way who work well.
You can write your own task. It is surprisingly easy.
Arne
>Ideally I'd like to put two spéchfic flags in source file and keep only
>the text between those flags. I looked around FilterChain and
>FilterReader ant tasks, but I can not find a way who work well.
>
>Some idea ?
You can always write some little Java program that takes command line
parms to do what you want.
Just read the source into RAM. See
http://mindprod.com/jgloss/products.html#HUNKIO
Use indexOf to find your two flags, and substring to suck up the
juice.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Roedy Green - 04 Jan 2008 04:22 GMT
On Fri, 04 Jan 2008 02:33:44 GMT, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :
>You can always write some little Java program that takes command line
>parms to do what you want.
you can hook it up as a stand alone utility. See
http://mindprod.com/jgloss/ant.html for some examples, or you can hook
it in via the Java API to integrate it even better.
All you need is a week to read all the JavaDoc for how to do it.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
ownowl - 04 Jan 2008 10:39 GMT
Roedy Green a écrit :
>> Ideally I'd like to put two spéchfic flags in source file and keep only
>> the text between those flags. I looked around FilterChain and
[quoted text clipped - 10 lines]
> Use indexOf to find your two flags, and substring to suck up the
> juice.
thank to you and Arne for your answer
I knew the way of customized java ant task (I done it in the past), but
for this case, for the moment, I prefer use native ant task. So I
finally use a workaround with filterchain and headfilter.
Olivier
> I use eclipse and ant for build an application (EAR). So I'd like to
> generate a readme file constituted by comments of several sources code.
>
> Ideally I'd like to put two spéchfic flags in source file and keep only
> the text between those flags. I looked around FilterChain and
> FilterReader ant tasks, but I can not find a way who work well.
You could use a combination of "find" and "sed" to accomplish this.
Maybe you do not even need "find" from an "ant" script.
Kind regards
robert
ownowl - 04 Jan 2008 13:38 GMT
Robert Klemme a écrit :
>> I use eclipse and ant for build an application (EAR). So I'd like to
>> generate a readme file constituted by comments of several sources code.
[quoted text clipped - 9 lines]
>
> robert
thanks Robert
I could use those commands, but they are unix commands (isn't it ?), and
I must be windows compliant. And primarily, this readme generator is a
part of several others ant tasks
Olivier
Robert Klemme - 04 Jan 2008 20:07 GMT
> Robert Klemme a écrit :
>>> I use eclipse and ant for build an application (EAR). So I'd like to
[quoted text clipped - 12 lines]
> I must be windows compliant. And primarily, this readme generator is a
> part of several others ant tasks
Well, there's cygwin and there's "Windows Services for Unix". :-) But
maybe you find a sed implementation in Java. Of course, writing this in
Java should not be too difficult either.
Kind regards
robert