[Swift-devel] script mapper
Mihael Hategan
hategan at mcs.anl.gov
Wed Oct 31 19:19:47 CDT 2007
Well, there were no objections so here it is:
file fs[]
<ext;exec="../php/list-frames.php",s=@arg("GPS_start_time"),e=@arg("GPS_end_time")>;
foreach f in fs {
print(@filename(f));
}
The script produces space separated pairs of a path and a file name. The
path is similar to what you would do in Swift. In the above case it
produces something like:
[0] file1
[1] file2
etc.
This can be used with arbitrary things, such as:
[0].somefield.array[3] file
The mapper arguments, except "exec", are mapped to command line
arguments prefixed with a hyphen. So the above example causes the
following to happen:
swift Plot1Chan.swift -GPS_start_time=877890090 -GPS_end_time=877543210
...
list-frames.php -s 877890090 -e 877543210
Mihael
On Wed, 2007-10-31 at 17:21 -0500, Mihael Hategan wrote:
> I'm working on a script mapper for swift. Basically it allows executing
> some form of local executable which spells on stdout (swift_path,
> file_path) pairs. This was motivated by my unwilingness to deal with a
> potentially deadlocking swift because the CSV mapper was used wrong in
> I2U2/LIGO (didn't actually get there, but wanted to avoid it).
>
> I believe Mike suggested something like this anyway.
>
> If you think I'm going in the wrong direction, it would be nice if you
> said so before I get deeper into it.
>
> Mihael
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
More information about the Swift-devel
mailing list