-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookvolume.pl
More file actions
582 lines (346 loc) · 16.1 KB
/
bookvolume.pl
File metadata and controls
582 lines (346 loc) · 16.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
#!C:/Perl/bin/perl -w
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
use IO::File;
use Cwd;
my ($sec,$min,$hour,$mday,$mon,$yr,$wday,$yday,$isdst)=localtime();
my $time=($yr+1900)."-".sprintf("%02d",$mon+1)."-".sprintf("%02d",$mday)."T".sprintf("%02d",$hour).":".sprintf("%02d",$min).":".sprintf("%02d",$sec);
my $defaultpage;
$Win32::OLE::Warn = 3; # Die on Errors.
# ::Warn = 2; throws the errors, but #
# expects that the programmer deals #
#First, we need an excel object to work with, so if there isn't an open one, we create a new one, and we define how the object is going to exit
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
#For the sake of this program, we'll turn off all those pesky alert boxes, such as the SaveAs response "This file already exists", etc. using the DisplayAlerts property.
$Excel->{DisplayAlerts}=0;
#get excel file name from ARGV
my $excelfile=shift(@ARGV);
my $dir = getcwd;
$dir=~s/\//\\/g;
print "dir is $dir\n";
$excelfile=$dir."//".$excelfile;
#opened an excel file to work with
my $Book = $Excel->Workbooks->Open($excelfile);
#Now we create a reference to a worksheet object and activate the sheet to give it focus so that actions taken on the workbook or application objects occur on this sheet unless otherwise specified.
my $Sheet = $Book->Worksheets("Sheet1");
$Sheet->Activate();
#Open the output file; print xml declaration and root node
#
(my $outputfile = $excelfile) =~ s/\.xls/\.xml/;
my $fh = IO::File->new($outputfile, 'w')
or die "unable to open output file for writing: $!";
##get structMapTopDivType
my $structMapTopDivType= shift(@ARGV);
metsOpening();
amdDigiProv();
##read rows and generate filegrp
my $usedRange = $Sheet->UsedRange()->{Value};
###generate filegroups
my $mimetype;
shift (@$usedRange);
shift (@$usedRange);
$fh->print("\t<mets:fileSec ID=\"FSD1\">\n");
if ($Sheet->Range("J2")->{Value}){
$fh->print("\t\t<mets:fileGrp USE=\"archive image\" VERSDATE=\"".$time."\">\n");
$mimetype="tiff";
fileGroup($mimetype);
$fh->print("\t\t<\/mets:fileGrp>\n");
};
if ($Sheet->Range("N2")->{Value}){
$fh->print("\t\t<mets:fileGrp USE=\"reference image\" VERSDATE=\"".$time."\">\n");
$mimetype="j2k";
fileGroup($mimetype);
$fh->print("\t\t<\/mets:fileGrp>\n");
};
$fh->print("\t\t<mets:fileGrp USE=\"reference image\" VERSDATE=\"".$time."\">\n");
$mimetype="jpeg";
fileGroup($mimetype);
$fh->print("\t\t<\/mets:fileGrp>\n");
if ($Sheet->Range("M2")->{Value}){
$fh->print("\t\t<mets:fileGrp USE=\"alto\" VERSDATE=\"".$time."\">\n");
$mimetype="alto";
fileGroup($mimetype);
$fh->print("\t\t<\/mets:fileGrp>\n");
};
####adding pdf filegrp
if ($Sheet->Range("L3")->{Value}){
$fh->print("\t\t<mets:fileGrp USE=\"pdf\" VERSDATE=\"".$time."\">\n");
#
$fh->print("\t\t\t<mets:file ID=\"pdf01000\" MIMETYPE=\"application/pdf\" ADMID=\"DP03\" GROUPID=\"GID1000\" SEQ=\"1000\">\n");
$fh->print("\t\t\t\t<mets:FLocat xlink:href=\"file://streams/".$Sheet->Range("L3")->{Value}."\" LOCTYPE=\"URL\"\/>\n");
$fh->print("\t\t\t<\/mets:file>\n");
#
$fh->print("\t\t<\/mets:fileGrp>\n");
};
####finished adding pdf fileGrp
$fh->print("\t</mets:fileSec>\n");
###find label for structMaps
my $label= $Sheet->Range("A1")->{Value};
##add structMap Counter
my $structMapCounter=0;
####generate mixed structMap
if ($Sheet->Range("B2")->{Value}=~ m/yes/) {
$structMapCounter=$structMapCounter+1;
$fh->print("\t<mets:structMap TYPE=\"mixed\" LABEL=\"Read Online\" ID=\"SMD".$structMapCounter."\">\n");
$fh->print("\t\t<mets:div TYPE=\"$structMapTopDivType\" LABEL=\"$label\" ORDER=\"1\" DMDID=\"DMD1\">\n");
structMapMixed();
$fh->print("\t\t</mets:div>\n");
$fh->print("\t</mets:structMap>\n");
}
####generate physical structMap
$structMapCounter=$structMapCounter+1;
$fh->print("\t<mets:structMap TYPE=\"physical\" LABEL=\"Read Online\" ID=\"SMD".$structMapCounter."\">\n");
$fh->print("\t\t<mets:div TYPE=\"$structMapTopDivType\" LABEL=\"$label\" ORDER=\"1\" DMDID=\"DMD1\">\n");
structMapPhysical();
$fh->print("\t\t</mets:div>\n");
$fh->print("\t</mets:structMap>\n");
####generate logical structMap
if ($Sheet->Range("D2")->{Value}=~ m/yes/) {
$structMapCounter=$structMapCounter+1;
$fh->print("\t<mets:structMap TYPE=\"logical\" LABEL=\"Read Online\" ID=\"SMD".$structMapCounter."\">\n");
$fh->print("\t\t<mets:div TYPE=\"$structMapTopDivType\" LABEL=\"$label\" ORDER=\"1\" DMDID=\"DMD1\">\n");
structMapLogical();
$fh->print("\t\t</mets:div>\n");
$fh->print("\t</mets:structMap>\n");
}
####generate pdf structMap
if ($Sheet->Range("L3")->{Value}) {
$structMapCounter=$structMapCounter+1;
$fh->print("\t<mets:structMap TYPE=\"pdf\" LABEL=\"PDF version\" ID=\"SMD".$structMapCounter."\">\n");
$fh->print("\t\t<mets:div TYPE=\"$structMapTopDivType\" LABEL=\"$label\" ORDER=\"1\" DMDID=\"DMD1\">\n");
$fh->print("\t\t\t\t<mets:fptr FILEID=\"pdf01000\"/>\n");
$fh->print("\t\t</mets:div>\n");
$fh->print("\t</mets:structMap>\n");
}
behaviorSec();
metsClosing();
$fh->close();
#######
sub metsOpening {
my $label = $Sheet->Range("A1")->{Value};
$fh->print("<?xml version='1.0' encoding='UTF-8' ?>\n");
$fh->print("<mets:mets OBJID=\"\" LABEL=\"$label\" TYPE=\"text-monographic-whole\" xmlns:mets=\"http://www.loc.gov/METS/\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"
xmlns:mods=\"http://www.loc.gov/mods/v3\"
xsi:schemaLocation=\"http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">
\n");
$fh->print("<mets:metsHdr CREATEDATE=\"".$time."\">\n");
$fh->print("\t<mets:agent ROLE=\"CREATOR\" TYPE=\"ORGANIZATION\">\n");
$fh->print("\t\t<mets:name>Boston College, University Libraries, Systems Office<\/mets:name>\n");
$fh->print("\t<\/mets:agent>\n");
$fh->print("<\/mets:metsHdr>\n");
$fh->print("<!--<mets:dmdSec ID=\"DMD1\">\n");
$fh->print("\t\t<mets:mdWrap MDTYPE=\"MODS\">\n");
$fh->print("\t\t\t<mets:xmlData>\n");
$fh->print("\t\t\t<\/mets:xmlData>\n");
$fh->print("\t\t<\/mets:mdWrap>\n");
$fh->print("\t<\/mets:dmdSec>-->\n");};
#########
sub metsClosing{ $fh->print("<\/mets:mets>\n");};
###########
sub fileGroup {
my $type=shift;
my $i=1;
foreach my $row (@$usedRange) {
my ($title,$mixed,$mixed2, $logical,$ill,$label,$orderlabel,$default, $filename, $md5, $pdf, $jpeg, $alto, $j2k) = @$row;
if ($default && ($default =~ m/yes/)) {$defaultpage = "jpg".sprintf("%05d", $i)}
if ($type eq 'jpeg')
{
$fh->print("\t\t\t<mets:file ID=\"jpg".sprintf("%05d", $i)."\" MIMETYPE=\"image\/jpeg\" ADMID=\"DP02\" GROUPID=\"GID".$i."\" SEQ=\"$i\">\n");
$fh->print("\t\t\t\t<mets:FLocat xlink:href=\"file://streams/".$filename.".jpg\" LOCTYPE=\"URL\"\/>\n");
$fh->print("\t\t\t<\/mets:file>\n");
$i++;}
if ($type eq 'tiff')
{$fh->print("\t\t\t<mets:file ID=\"tif".sprintf("%05d", $i)."\" MIMETYPE=\"image\/tiff\" ADMID=\"DP01\" GROUPID=\"GID".$i."\" SEQ=\"$i\">\n");
$fh->print("\t\t\t\t<mets:FLocat xlink:href=\"file://streams/" . $filename . ".tif\" LOCTYPE=\"URL\"\/>\n");
$fh->print("\t\t\t<\/mets:file>\n");
$i++;}
if ($type eq 'alto')
{$fh->print("\t\t\t<mets:file ID=\"alto".sprintf("%05d", $i)."\" MIMETYPE=\"text\/xml\" ADMID=\"DP04\" GROUPID=\"GID".$i."\" SEQ=\"$i\">\n");
$fh->print("\t\t\t\t<mets:FLocat xlink:href=\"file://streams/" .$filename . "_ALTO.xml\" LOCTYPE=\"URL\"\/>\n");
$fh->print("\t\t\t<\/mets:file>\n");
$i++;}
if ($type eq 'j2k')
{$fh->print("\t\t\t<mets:file ID=\"j2k".sprintf("%05d", $i)."\" MIMETYPE=\"image\/jp2\" ADMID=\"DP05\" GROUPID=\"GID".$i."\" SEQ=\"$i\">\n");
$fh->print("\t\t\t\t<mets:FLocat xlink:href=\"file://streams/" . $filename . ".jp2\" LOCTYPE=\"URL\"\/>\n");
$fh->print("\t\t\t<\/mets:file>\n");
$i++;}
};
};
####
####
sub structMapPhysical {
my $div=1;
my $filecount=1;
my $label;
foreach my $row (@$usedRange) {
my ($title, $mixed, $mixed2,$logical,$ill,$label,$orderlabel,$default,$filename) = @$row;
if ($label =~ m/^\d+$/) {$label = "p. ".$label}
if ($ill) {$label=$label ." (".$ill.")"};
$fh->print("\t\t\t<mets:div TYPE=\"page\" LABEL=\"".$label. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div."\">\n");
if ($Sheet->Range("J2")->{Value}) {
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n")
};
if ($Sheet->Range("M2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t<\/mets:div>\n");
$div++;
$filecount++;
}
}
####
####
sub structMapLogical {
my $div=1;
my $filecount=1;
my $label;
foreach my $row (@$usedRange) {
my ($title, $mixed, $mixed2,$logical,$ill,$label,$orderlabel,$default,$filename) = @$row;
if ($ill =~ m/yes/) {$logical=$logical." (illustration)"};
$fh->print("\t\t\t<mets:div TYPE=\"logical\" LABEL=\"".$logical. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div."\">\n");
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n");
if ($Sheet->Range("M2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t<\/mets:div>\n");
$div++;
$filecount++;
}
}
######
sub structMapMixed {
my @logical_open = qw( closed closed ); #array to represent open/closed status of two logical div levels (both content)
my $mixed_div_count=1;
my $mixed2_div_count=1;
my $div_count=1;
my $filecount=1;
my $label;
foreach my $row (@$usedRange) {
my ($title, $mixed, $mixed2,$logical,$ill,$label,$orderlabel,$default,$filename) = @$row;
if ($label =~ m/^\d+$/) {$label = "p. ".$label}
if ($ill) {$label=$label ." (".$ill.")"};
if ($mixed && $mixed2) {
if ($logical_open[0] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
if ($logical_open[1] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
## set div status to open
$logical_open[0] = 'open';
$logical_open[1] = 'open';
$div_count=1;
$mixed2_div_count=1;
$fh->print("\t\t\t<mets:div TYPE=\"logical\" LABEL=\"".$mixed. "\" ORDERLABEL=\"".$mixed_div_count."\" ORDER=\"".$mixed_div_count."\">\n");
$mixed_div_count++;
$fh->print("\t\t\t<mets:div TYPE=\"logical\" LABEL=\"".$mixed2. "\" ORDERLABEL=\"".$mixed2_div_count."\" ORDER=\"".$mixed2_div_count."\">\n");
$mixed2_div_count++;
$fh->print("\t\t\t<mets:div TYPE=\"page\" LABEL=\"".$label. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div_count."\">\n");
if ($Sheet->Range("J2")->{Value}) {
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n")
};
if ($Sheet->Range("M2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t\t<\/mets:div>\n");
$div_count++;
$filecount++;
}
##
if ((! $mixed) && ($mixed2)) {
if ($logical_open[1] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
## set div status to open
$logical_open[1] = 'open';
$div_count=1;
$fh->print("\t\t\t\t<mets:div TYPE=\"logical\" LABEL=\"".$mixed2. "\" ORDERLABEL=\"".$mixed2_div_count."\" ORDER=\"".$mixed2_div_count."\">\n");
$mixed2_div_count++;
$fh->print("\t\t\t<mets:div TYPE=\"page\" LABEL=\"".$label. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div_count."\">\n");
if ($Sheet->Range("J2")->{Value}) {
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n")
};
if ($Sheet->Range("M2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t\t<\/mets:div>\n");
$div_count++;
$filecount++;
}
##
if (($mixed) && (! $mixed2)) {
if ($logical_open[0] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
if ($logical_open[1] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
## set div status to open
$logical_open[0] = 'open';
$logical_open[1] = 'closed';
$div_count=1;
$fh->print("\t\t\t<mets:div TYPE=\"logical\" LABEL=\"".$mixed. "\" ORDERLABEL=\"".$mixed_div_count."\" ORDER=\"".$mixed_div_count."\">\n");
$mixed_div_count++;
$mixed2_div_count=1;
$fh->print("\t\t\t<mets:div TYPE=\"page\" LABEL=\"".$label. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div_count."\">\n");
if ($Sheet->Range("J2")->{Value}) {
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n")
};
if ($Sheet->Range("M2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t\t<\/mets:div>\n");
$div_count++;
$filecount++;
}
if ((! $mixed) && (! $mixed2)) {
$fh->print("\t\t\t<mets:div TYPE=\"page\" LABEL=\"".$label. "\" ORDERLABEL=\"".$orderlabel."\" ORDER=\"".$div_count."\">\n");
if($Sheet->Range("M2")->{Value}){ $fh->print("\t\t\t\t<mets:fptr FILEID=\"alto".sprintf("%05d",$filecount)."\"/>\n")};
if ($Sheet->Range("J2")->{Value}) {
$fh->print("\t\t\t\t<mets:fptr FILEID=\"tif".sprintf("%05d",$filecount)."\"/>\n")
};
if ($Sheet->Range("N2")->{Value}) {$fh->print("\t\t\t\t<mets:fptr FILEID=\"j2k".sprintf("%05d",$filecount)."\"/>\n")};
$fh->print("\t\t\t\t<mets:fptr FILEID=\"jpg".sprintf("%05d",$filecount)."\"/>\n");
$fh->print("\t\t\t\t<\/mets:div>\n");
$div_count++;
$filecount++;
}
}
if ($logical_open[0] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
if ($logical_open[1] eq 'open') {$fh->print("\t\t\t\t<\/mets:div>\n")};
}
####
####
sub amdDigiProv {
# hash of cells that cotain digiprove data
my %digiProv = (
J2 => 'DP01' , #cell of tiffs used to generate derivatives
K2 => 'DP02' , #cell of derivatives
L2 => 'DP03' , #cell of pdf
M2 => 'DP04' , #cell of alto file
N2 => 'DP05'); #cell of uncropped masters
$fh->print("\t<mets:amdSec ID=\"AMD1\">\n");
foreach my $k (sort(keys %digiProv))
{
if ($Sheet->Range($k)->{Value})
{
$fh->print("\t\t<mets:digiprovMD ID=\"".$digiProv{$k}."\">\n");
$fh->print("\t\t\t<mets:mdWrap MDTYPE=\"OTHER\" OTHERMDTYPE=\"local\">\n");
$fh->print("\t\t\t\t<mets:xmlData>\n");
$fh->print("\t\t\t\t\t<bcdigiprov>\n");
$fh->print("\t\t\t\t\t\t<note>".$Sheet->Range($k)->{Value}."<\/note>\n");
$fh->print("\t\t\t\t\t<\/bcdigiprov>\n");
$fh->print("\t\t\t\t<\/mets:xmlData>\n");
$fh->print("\t\t\t<\/mets:mdWrap>\n");
$fh->print("\t\t<\/mets:digiprovMD>\n");
}
print"key is $k and $digiProv{$k}\n";
};
$fh->print("\t<\/mets:amdSec>\n");
}
sub behaviorSec {
$fh->print("\t<mets:behaviorSec>\n");
$fh->print("\t\t<mets:behavior ID=\"BEHAVIOR1\" STRUCTID=\"$defaultpage\" BTYPE=\"DISPLAY\" LABEL=\"For each structMap, tells the system which page the book should open to as a default\">\n");
$fh->print("\t\t\t<mets:interfaceDef LOCTYPE=\"OTHER\"\/>\n");
$fh->print("\t\t\t<mets:mechanism LOCTYPE=\"OTHER\"\/>\n");
$fh->print("\t\t<\/mets:behavior>\n");
$fh->print("\t<\/mets:behaviorSec>\n");
}
=cut
usage: bookvolume.pl template.xlsx volume or manuscript
" Remember to type volume on the command line
" Further fill in the digiprov information
=cut