ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiroaki Nakamura <hnaka...@mc.neweb.ne.jp>
Subject Re: task for native2ascii
Date Sat, 16 Sep 2000 16:35:49 GMT
Andrew Sudell wrote:
> 
> Is there any interest in a task do wrap native2ascii?  I've built a
> prototype and am more than willing to contribute it if there's
> interest.

I am very interested.

(snip)
> Creating a task for every file seems a bit tedious, but off hand
> I don't see a good alternative, since to the relationship between
> input and output are somewhat arbitrary.

I suppose that in most cases of using native2ascii, you don't want
mix sources files and destination files in the same directory,  so
I think it is natural that the native2ascii would be a subclass
of MatchingTask and that srcDir and destDir are mandatory attributes.
And you can specify source files with the "include" nested tags, or
with any other ways built in MatchingTask.

About filenames, two cases come to my mind.
case 1: Each pair of a source filename and a destination filename
        have the same name.
case 2: A destination file will be named after a source file
        using some naming rules.
In case 2, a rule might be replacing some string in a source
filename to another string, so the native2ascii can have
two optional attributes, "token" and "value" (named after the Replace
task).  For example, if you change the destination directory to
"foo", Andrew's example will become:

<native2ascii encoding="EUCJIS" srcDir="." destDir="foo"
    token=".euc" value="_ja_JP.java" includes="*.euc" />

Any other thought?

-- 
)Hiroaki Nakamura) hnakamur@mc.neweb.ne.jp

Mime
View raw message