Skip to content
Snippets Groups Projects
Commit 57b0cc2e authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- added warning / user hint about missing title

parent 7e6685a4
No related branches found
No related tags found
No related merge requests found
......@@ -587,6 +587,7 @@ use Getopt::Long;
use Path::Tiny;
use Carp; # confess()
use Pod::Usage; # pod2usage()
use List::Util qw(none);
my $save;
my $ieDirectory;
......@@ -766,6 +767,14 @@ sub main{
# get bag name
my $bagNameDir = SLUB::LZA::SIPBuilderBagIt::generateBagName($exportToArchiveDate, $ppn, $noppn);
# user hints
my @keys;
for my $hash (@addBagInfo) {
push @keys, keys %{$hash};
}
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("", "WARNING: No Title given. Please consider adding a human-readable title with '--add_key_value=Title:YOUR-TITLE'", "", "yellow")
if none { $_ =~ m/^[Tt][Ii][Tt][Ll][Ee]/ } @keys;
# save options
if($save eq "copy") {
my $bagPath = "$outputPath/$bagNameDir";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment