Skip to content
Snippets Groups Projects
Commit 23f27f0a authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- bugfix, fix in URL (because ExL v7.1.x has stronger url checking)

- added --step option
parent eea63eb2
Branches
Tags
No related merge requests found
...@@ -31,6 +31,7 @@ my $institution; ...@@ -31,6 +31,7 @@ my $institution;
my $plugin_name = 'SLUBTechnicalMetadataExtractorCheckItTiffPlugin'; my $plugin_name = 'SLUBTechnicalMetadataExtractorCheckItTiffPlugin';
my $classification_group = 'Image (Mix)'; my $classification_group = 'Image (Mix)';
my $driver; my $driver;
my $step;
GetOptions( GetOptions(
"rosetta_host=s{1}" => \$host, "rosetta_host=s{1}" => \$host,
...@@ -40,7 +41,8 @@ GetOptions( ...@@ -40,7 +41,8 @@ GetOptions(
"password=s{1}" => \$passwd, "password=s{1}" => \$passwd,
"institution=s{1}" => \$institution, "institution=s{1}" => \$institution,
"plugin_name:s{1}" => \$plugin_name, "plugin_name:s{1}" => \$plugin_name,
"classification_group:s{1}" => \$classification_group "classification_group:s{1}" => \$classification_group,
"step=i" => \$step,
) or die("Error in command line arguments\n"); ) or die("Error in command line arguments\n");
die("invalid/missing argument: --rosetta_host") unless $host; die("invalid/missing argument: --rosetta_host") unless $host;
die("invalid/missing argument: --protocol") unless $protocol; die("invalid/missing argument: --protocol") unless $protocol;
...@@ -167,7 +169,7 @@ sub join_dnx_property_to_classification_group ($dnx_property) { ...@@ -167,7 +169,7 @@ sub join_dnx_property_to_classification_group ($dnx_property) {
sub extractors_add_mapping ($dnx_property, $exiftool_property) { sub extractors_add_mapping ($dnx_property, $exiftool_property) {
say "try to add extractor mapping"; say "try to add extractor mapping";
# go to custom extractor page (local format library) # go to custom extractor page (local format library)
$driver->get("$protocol://$host:${ui_port}//mng/action/pageAction.page_xml.page_extractors_list.xml.do?pageBean.deploymentMode=BUNDLED&pageViewMode=Edit&pageBean.currentUserMode=LOCAL&RenewBean=true&menuKey=com.exlibris.dps.wrk.general.menu.Preservation.AdvancedPreservationActivities.mngLibraryLOCAL.mngLibraryHeader.Extractors.InnerMenu&menuKey=com.exlibris.dps.wrk.general.menu.Preservation.AdvancedPreservationActivities.mngLibraryLOCAL.mngLibraryHeader.Extractors.InnerMenu&backUrl="); $driver->get("$protocol://$host:${ui_port}/mng/action/pageAction.page_xml.page_extractors_list.xml.do?pageBean.deploymentMode=BUNDLED&pageViewMode=Edit&pageBean.currentUserMode=LOCAL&RenewBean=true&menuKey=com.exlibris.dps.wrk.general.menu.Preservation.AdvancedPreservationActivities.mngLibraryLOCAL.mngLibraryHeader.Extractors.InnerMenu&menuKey=com.exlibris.dps.wrk.general.menu.Preservation.AdvancedPreservationActivities.mngLibraryLOCAL.mngLibraryHeader.Extractors.InnerMenu");
$driver->pause(); $driver->pause();
$driver->find_element("Custom", "link")->click; $driver->find_element("Custom", "link")->click;
# filter by plugin name # filter by plugin name
...@@ -221,24 +223,30 @@ printf colored("Step 2 of 7: change to global format library \n", 'bold green'); ...@@ -221,24 +223,30 @@ printf colored("Step 2 of 7: change to global format library \n", 'bold green');
change_to_global_format_library(); change_to_global_format_library();
# add dnx property # add dnx property
printf colored("Step 3 of 7: add dnx property \n", 'bold green'); if (!defined $step or $step == 3) {
foreach my $exiftool_property (sort keys %exiftool2dnx) { printf colored("Step 3 of 7: add dnx property \n", 'bold green');
my $dnx_property = $exiftool2dnx{ $exiftool_property }; foreach my $exiftool_property (sort keys %exiftool2dnx) {
add_dnx_property($dnx_property, "$dnx_property <- Exiftool '$exiftool_property'"); my $dnx_property = $exiftool2dnx{ $exiftool_property };
add_dnx_property($dnx_property, "$dnx_property <- Exiftool '$exiftool_property'");
}
} }
# include dnx property to classification group # include dnx property to classification group
printf colored("Step 4 of 7: join dnx property to classification group \n", 'bold green'); if (!defined $step or $step == 4) {
foreach my $exiftool_property (sort keys %exiftool2dnx) { printf colored("Step 4 of 7: join dnx property to classification group \n", 'bold green');
my $dnx_property = $exiftool2dnx{ $exiftool_property }; foreach my $exiftool_property (sort keys %exiftool2dnx) {
join_dnx_property_to_classification_group($dnx_property); my $dnx_property = $exiftool2dnx{ $exiftool_property };
join_dnx_property_to_classification_group($dnx_property);
}
} }
# add mapping # add mapping
printf colored("Step 5 of 7: extractors add mapping \n", 'bold green'); if (!defined $step or $step == 5) {
foreach my $exiftool_property (sort keys %exiftool2dnx) { printf colored("Step 5 of 7: extractors add mapping \n", 'bold green');
my $dnx_property = $exiftool2dnx{ $exiftool_property }; foreach my $exiftool_property (sort keys %exiftool2dnx) {
extractors_add_mapping($dnx_property, $exiftool_property); my $dnx_property = $exiftool2dnx{ $exiftool_property };
extractors_add_mapping($dnx_property, $exiftool_property);
}
} }
# change to local format library # change to local format library
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment