Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Commit

Permalink
Adding 500 field for video file listing
Browse files Browse the repository at this point in the history
  • Loading branch information
awead committed Apr 21, 2012
1 parent 650cebc commit 4632f4c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ mount/*
nohup.out
HPSS_audio_audiopro.keytab
variations.key
tmp/*
27 changes: 27 additions & 0 deletions tools/marc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@

print DEBUG "Path to the MDSS file listing is $MDSSFileListingPath \n" if ($DEBUG);

# Determine location of _MDSSVideoFileNames.txt
$MDSSVideoFileListingPath
= $path
. "/access\/logs\/"
. $varID
. "_MDSSVideoFileNames.txt";

print DEBUG "Path to the MDSS video file listing is $MDSSVideoFileListingPath \n" if ($DEBUG);

# Find the access files from which we get the track metadata
$findAccessWAVFiles = "find " . $path . "/access -name " . $varID . "_access\*.wav";
@accessWAVFiles = `$findAccessWAVFiles`;
Expand Down Expand Up @@ -286,6 +295,22 @@
$MDSSAccessFiles =~ s/\n\s/\n/g;
print DEBUG "MDSSAcessFiles are --" . $MDSSAccessFiles . "--\n" if $DEBUG;

# Check for video file
if (-e $MDSSVideoFileListingPath) {
open (READVIDEOMDSS, $MDSSVideoFileListingPath)
|| (die "Can't open file $MDSSVideoFileListingPath\n");
@MDSSVideoFiles = <READVIDEOMDSS>;
close (READVIDEOMDSS);

# Clean up
$MDSSVideoFilesLine = join ("", @MDSSVideoFiles);
chomp $MDSSVideoFilesLine;
$MDSSVideoFilesLine =~ s/\r//g;
if ($DEBUG) {
print DEBUG "Video files line is --" . $MDSSVideoFilesLine . "--\n";
}
}


# Create the 008 field
#
Expand Down Expand Up @@ -376,6 +401,7 @@
print MARC ".505." . " 0 " . "|a" . $contentsLine . "\n";
print MARC ".500." . " " . "|a" . $MDSSPresFiles . "\n";
print MARC ".500." . " " . "|a" . $MDSSAccessFiles . "\n";
print MARC ".500." . " " . "|a" . $MDSSVideoFilesLine . "\n" if $MDSSVideoFilesLine;
print MARC ".700." . " " . "|a" . diacritFix( $info->{'artist'} ) . "\n";
print MARC ".810." . " 2 " . "|aIndiana University Jacobs School of Music.|tProgram ;|v" . $info->{'subject'} . "\n";
print MARC ".856."
Expand Down Expand Up @@ -405,6 +431,7 @@
print MARC ".505." . " 0 " . "|a" . $contentsLine . "\n";
print MARC ".500." . " " . "|a" . $MDSSPresFiles . "\n";
print MARC ".500." . " " . "|a" . $MDSSAccessFiles . "\n";
print MARC ".500." . " " . "|a" . $MDSSVideoFilesLine . "\n" if $MDSSVideoFilesLine;
print MARC ".810." . " 2 " . "|aIndiana University Jacobs School of Music.|tProgram ;|v" . $info->{'subject'} . "\n";
print MARC ".856."
. " 40"
Expand Down

0 comments on commit 4632f4c

Please sign in to comment.