Changeset 32511 for main/trunk
- Timestamp:
- 2018-10-10T21:25:13+13:00 (6 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/plugoutinfo.pl
r17201 r32511 177 177 my $plugout; 178 178 push @$plugout,$plugout_name; 179 my $plugoutobj = &plugout::load_plugout ($plugout );179 my $plugoutobj = &plugout::load_plugout ($plugout, "info_only"); 180 180 if ($describeall) { 181 181 $plugoutobj->print_xml_usage(0); … … 202 202 push @$plugout,$plugout_name; 203 203 204 my $plugoutobj = &plugout::load_plugout($plugout );204 my $plugoutobj = &plugout::load_plugout($plugout, "info_only"); 205 205 206 206 if ($xml) { -
main/trunk/greenstone2/perllib/plugout.pm
r27306 r32511 48 48 sub load_plugout{ 49 49 my ($plugout) = shift @_; 50 my ($info_only) = shift @_; # optional. Set to info_only if we're just printing out plugout info 50 51 my $plugout_name = shift @$plugout; 52 51 53 my $plugout_suffix = &FileUtils::filenameConcatenate('perllib', 'plugouts', $plugout_name . '.pm'); 52 54 my $plugout_found = 0; … … 148 150 my ($plugobj); 149 151 152 # if just doing plugoutinfo.pl, add in -gsdlinfo to plugout object's options 153 if($info_only) { 154 unshift (@$plugout, "-gsdlinfo"); 155 } 156 150 157 eval ("\$plugobj = new \$plugout_name([],\$plugout)"); 151 158 die "$@" if $@; -
main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm
r32159 r32511 133 133 134 134 # Check if gsdlinfo is in the argument list or not - if it is, don't parse 135 # the args, just return the object. 135 # the args, just return the object. 136 #print STDERR "#### " . join(",", @${args}) . "\n\n"; 136 137 foreach my $strArg (@{$args}) 137 138 { -
main/trunk/greenstone2/perllib/plugouts/DSpacePlugout.pm
r27882 r32511 60 60 push(@{$hashArgOptLists->{"OptList"}},$options); 61 61 62 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 63 62 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 63 64 if ($self->{'info_only'}) { 65 # don't worry about any options etc 66 return bless $self, $class; 67 } 64 68 # print STDERR "***** metadata prefix = \"", $self->{'metadata_prefix'}, "\"\n"; 65 69 -
main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm
r28562 r32511 37 37 @FedoraMETSPlugout::ISA = ('METSPlugout'); 38 38 39 if ((!defined $ENV{'FEDORA_HOME'}) || (!defined $ENV{'FEDORA_VERSION'})) { 40 if (defined $ENV{'FEDORA_HOME'}) { 41 print STDERR "FEDORA_HOME = $ENV{'FEDORA_HOME'}"; 42 } 43 44 if (defined $ENV{'FEDORA_VERSION'}) { 45 print STDERR "FEDORA_VERSION = $ENV{'FEDORA_VERSION'}"; 46 } 47 48 die "Need both environment variables FEDORA_HOME and FEDORA_VERSION to be set\n"; 49 } 39 # Need both environment variables FEDORA_HOME and FEDORA_VERSION to be set to use this plugout! 40 # But we only test these vars are set in the constructor, so as not to break plugoutinfo.pl by 41 # a 'die' statement here nor break the xml that plugoutinfo.pl produces with print stmts here 42 50 43 51 44 $ENV{'FEDORA_HOSTNAME'} = "localhost" if (!defined $ENV{'FEDORA_HOSTNAME'}); … … 88 81 89 82 my $self = new METSPlugout($plugoutlist,$inputargs,$hashArgOptLists); 90 83 84 if ($self->{'info_only'}) { 85 # don't worry about any options etc 86 return bless $self, $class; 87 } 88 89 # else (if we're not producing information for plugoutinfo.pl) make sure 90 # BOTH env vars FEDORA_HOME and FEDORA_VERSION are set. If either not set, die. 91 if ((!defined $ENV{'FEDORA_HOME'}) || (!defined $ENV{'FEDORA_VERSION'})) { 92 if (defined $ENV{'FEDORA_HOME'}) { 93 print STDERR "FEDORA_HOME = $ENV{'FEDORA_HOME'}"; 94 } 95 96 if (defined $ENV{'FEDORA_VERSION'}) { 97 print STDERR "FEDORA_VERSION = $ENV{'FEDORA_VERSION'}"; 98 } 99 100 die "ERROR: Need both environment variables FEDORA_HOME and FEDORA_VERSION to be set\n"; 101 } 102 91 103 return bless $self, $class; 92 104 } -
main/trunk/greenstone2/perllib/plugouts/GreenstoneMETSPlugout.pm
r17203 r32511 57 57 58 58 my $self = new METSPlugout($plugoutlist,$inputargs,$hashArgOptLists); 59 60 if ($self->{'info_only'}) { 61 # don't worry about any options etc 62 return bless $self, $class; 63 } 59 64 60 65 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugouts/GreenstoneXMLPlugout.pm
r28642 r32511 63 63 64 64 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 65 65 66 if ($self->{'info_only'}) { 67 # don't worry about any options etc 68 return bless $self, $class; 69 } 66 70 return bless $self, $class; 67 71 } -
main/trunk/greenstone2/perllib/plugouts/MARCXMLPlugout.pm
r28706 r32511 78 78 79 79 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 80 80 81 if ($self->{'info_only'}) { 82 # don't worry about any options etc 83 return bless $self, $class; 84 } 85 81 86 $self->{'buffered_output'} =""; 82 87 -
main/trunk/greenstone2/perllib/plugouts/METSPlugout.pm
r28708 r32511 71 71 72 72 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 73 73 74 if ($self->{'info_only'}) { 75 # don't worry about any options etc 76 return bless $self, $class; 77 } 78 74 79 if(defined $self->{'xslt_txt'} && $self->{'xslt_txt'} ne "") 75 80 {
Note:
See TracChangeset
for help on using the changeset viewer.