ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Martin" <antu...@gmail.com>
Subject Re: Access source file from mapper
Date Tue, 12 Dec 2006 11:32:17 GMT
I guess it would be more like (not tested):

<ac:for param="file">
  <fileset dir="src" includes="**/*.jpg" />
  <sequential>
    <exif file="@{file}">
      <getdate property="exif.date" format="yyyyMMddhhmmss" override="true" />
    </exif>
    <copy file="@{file}" tofile="dest/${exif.date}.jpg" />
  </sequential>
</ac:for>

<exif> is a task i am also working on (antexif @ sourceforge)

Thank you,

Patrick

On 12/11/06, Matt Benson <gudnabrsam@yahoo.com> wrote:
> --- Dominique Devienne <ddevienne@gmail.com> wrote:
>
> > > I did not find anything :-(. I was just hoping
> > there would be a trick somewhere.
> >
> > Maybe this is too weird, but this could possibly
> > work:
>
> Right; the problem is that a <mapper> is, in longhand,
> a "filename mapper."  NAME being the key.  Mappers
> were never designed to know more than a file's name.
> So the closest you'll probably get anytime soon would
> be to implement a selector that can relate the file's
> type to its content, and use this in conjunction with
> ac:for, perhaps like (if my understanding of the
> problem is close enough):
>
> <property name="exts" value="tif,gif,png,jpg" />
>
> <ac:for param="ext" list="${exts}">
>   <sequential>
>     <copy todir="dest">
>       <fileset dir="src">
>         <custom-sel type="@{ext}" />
>       </fileset>
>       <globmapper from="*.*"  to="*.@{ext}" />
>     </copy>
>   </sequential>
> </ac:for>
>
> Is that really so much worse?
>
> -Matt
>
> [SNIP]
>
>
>
> ____________________________________________________________________________________
> Need a quick answer? Get one in minutes from people who know.
> Ask your question on www.Answers.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message