diff options
-rwxr-xr-x | scripts/indexed-filenames | 13 |
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"); + } } } |