aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-04-03 17:01:52 -0700
committerThomas White <taw@physics.org>2015-04-20 12:55:03 +0200
commitc36dad8b186a2415375b5308bf0a68c59051f5aa (patch)
tree531c5b3662033021237ec237ccc643ce187ce003 /scripts
parent9f221feb00bb2b6c3d8b5f115b72b64cdee272d5 (diff)
scripts/indexed-filenames: Keep track of event IDs as well, if necessary
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/indexed-filenames13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/indexed-filenames b/scripts/indexed-filenames
index 842d264d..e4ea443a 100755
--- a/scripts/indexed-filenames
+++ b/scripts/indexed-filenames
@@ -7,24 +7,35 @@ open(FH, $ARGV[0]);
my $line;
my $is_indexed;
my $filename;
+my $event = "";
while ( $line = <FH> ) {
if ( $line =~ /^-----\ Begin chunk\ -----$/ ) {
$is_indexed = 0;
+ $event = "";
}
if ( $line =~ /^Image\ filename: (.*)$/ ) {
$filename = $1;
}
+ if ( $line =~ /^Event: (.*)$/ ) {
+ $event = $1;
+ }
+
if ( $line =~ /^Cell\ parameters/ ) {
$is_indexed = 1;
}
if ( $line =~ /^-----\ End chunk\ -----$/ ) {
if ( $is_indexed ) {
- printf("%s\n", $filename);
+ printf("%s", $filename);
+ if ( $event ) {
+ printf(" %s\n", $event);
+ } else {
+ printf("\n");
+ }
}
}