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
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ my $institution;
my $plugin_name = 'SLUBTechnicalMetadataExtractorCheckItTiffPlugin';
my $classification_group = 'Image (Mix)';
my $driver;
my $step;
GetOptions(
"rosetta_host=s{1}" => \$host,
......@@ -40,7 +41,8 @@ GetOptions(
"password=s{1}" => \$passwd,
"institution=s{1}" => \$institution,
"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");
die("invalid/missing argument: --rosetta_host") unless $host;
die("invalid/missing argument: --protocol") unless $protocol;
......@@ -167,7 +169,7 @@ sub join_dnx_property_to_classification_group ($dnx_property) {
sub extractors_add_mapping ($dnx_property, $exiftool_property) {
say "try to add extractor mapping";
# 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->find_element("Custom", "link")->click;
# filter by plugin name
......@@ -221,24 +223,30 @@ printf colored("Step 2 of 7: change to global format library \n", 'bold green');
change_to_global_format_library();
# add dnx property
printf colored("Step 3 of 7: add dnx property \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
add_dnx_property($dnx_property, "$dnx_property <- Exiftool '$exiftool_property'");
if (!defined $step or $step == 3) {
printf colored("Step 3 of 7: add dnx property \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
add_dnx_property($dnx_property, "$dnx_property <- Exiftool '$exiftool_property'");
}
}
# include dnx property to classification group
printf colored("Step 4 of 7: join dnx property to classification group \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
join_dnx_property_to_classification_group($dnx_property);
if (!defined $step or $step == 4) {
printf colored("Step 4 of 7: join dnx property to classification group \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
join_dnx_property_to_classification_group($dnx_property);
}
}
# add mapping
printf colored("Step 5 of 7: extractors add mapping \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
extractors_add_mapping($dnx_property, $exiftool_property);
if (!defined $step or $step == 5) {
printf colored("Step 5 of 7: extractors add mapping \n", 'bold green');
foreach my $exiftool_property (sort keys %exiftool2dnx) {
my $dnx_property = $exiftool2dnx{ $exiftool_property };
extractors_add_mapping($dnx_property, $exiftool_property);
}
}
# 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