NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [idvdevelopers] ISL scripting

Possible can be done using python scripting?

-jun

-----Original Message-----
From: Stuart Wier [mailto:wier@xxxxxxxxxx] 
Sent: Tuesday, April 06, 2010 10:20 AM
To: Jun Chen; idvdevelopers@xxxxxxxxxxxxxxxx
Subject: Re: [idvdevelopers] ISL scripting



Jun Chen wrote:
> Following that example isl file multiplefiles.isl:
> 
> <isl offscreen="false">
>    <fileset  pattern=".*\.nc">
>      <echo message="File: ${file}"/>
>      <bundle file="${islpath}/test.xidv">
> <!-- This sets the data file in the bundle to the ${file} -->
>       <setfiles datasource=".*" file="${file}"/>
>      </bundle>
>      <pause seconds="20"/>
>    </fileset>
> </isl>
> 
> I want to dynamically generate each image file based on each file
> ${file}, but that file contains path and link from a location I only
> have read permission, my question is:
> 
> How can I extract the (only) file name (without file extension) from
> ${file}?
> Say ${file}="/myserver/mydirectory/myfile1.nc"
> 
> Is there any way I can extract just myfile1 from ${file}?
> 
> So I can add:
> 
> <image file="${islpath}/${myfilename}.png" />
> 
> Above, ${myfilename} should change corresponding to ${file}
> 
> Please help.
> 
> I am new to IDV, and found it's very useful, but poor documentation.
> 
> 

Use shell scripting to create your file names and then use the shell to
write your isl file dynamically.

ISL is not a replacement for the shell.



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvdevelopers archives: