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

- minor fixes in description

- reorganized options
parent fde5e9f4
No related branches found
No related tags found
No related merge requests found
......@@ -15,26 +15,28 @@ sub abstract {"searches Archival Information System (AIS)";}
my $description=<<"DESCR";
Searches an AIS for descriptive or source metadata on behalf of the Technical Analyst.
Returns response including dc-records. Only the first 10 matches will be presented by default.
Returns AIP id. Only the first 10 matches will be presented by default.
Examples:
* Is this dc identifier in archive?
$0 count -d SLUB:LZA:Kitodo:kitodo:422766
* Which AIP has this dc identifier?
$0 search -d SLUB:LZA:Kitodo:kitodo:422766
'$0 search -d SLUB:LZA:Kitodo:kitodo:422766'
* Which AIPs are public domain?
$0 search -s publicdomain
'$0 search -s publicdomain'
* Which AIPs are copyrighted?
$0 search -s copyrighted
'$0 search -s copyrighted'
* Which AIPs were modified in 2021-05-31?
$0 search -m 2021-05-31
'$0 search -m 2021-05-31'
Which AIPs have at least one invalid file?
$0 search --with-invalid-files
'$0 search --with-invalid-files'
* Which AIPs with mkv-files are in archive?
$0 search --with-format=fmt/569
* Which AIPs have at least one file without virus check?
$0 search --with-missed-viruscheck
'$0 search --pronom-format=fmt/569'
* Which AIP has this dc identifier? Print the AIP id, lzaid of matching AIP
as Rows of String Values (RSV)
'$0 search -d SLUB:LZA:Kitodo:kitodo:422766 --with-lzaid --output-as-rsv'
DESCR
sub description {
......@@ -42,13 +44,29 @@ sub description {
}
sub opt_spec {
return(
["target-version|V" => "get current elasticsearch version"],
["verbose|v" => "enable verbose output"],
["target-version|V" => "get current elasticsearch version", {shortcircuit => 1}],
["debug" => "enable user agent debug output"],
["datemode" => hidden => {one_of => [
["output-format" => hidden => {
one_of => [
["output-as-rsv|r" => "prints output as Raw Strings Values (RSV) [default]"],
["output-as-csv|C" => "prints output as Comma Separated Values (CSV)"],
["verbose|v" => "enable verbose output, returns full elasticsearch response"],
]
}
],
["with-lzaid" => "also returns lzaid"],
["with-path" => "also returns AIP path"],
["with-size" => "also returns AIP size"],
["with-filecount" => "also returns AIPs file count"],
["with-export2archive-date" => "also returns AIP export to archive date"],
["with-creationdate" => "also returns AIP creation date"],
["datemode" => hidden => {
one_of => [
["creationdate|c=s" => "search based on creationdate string"],
["modificationdate|m=s" => "search based on modificationdate string"]
] } ],
]
}
],
["lzaid|l=s", "search a specific AIP by given LZA id"],
["descriptive|d=s", "search descriptive metadata (dc identifier)"],
["source|s=s", "search source metadata"],
......@@ -56,18 +74,9 @@ sub opt_spec {
["maxrecords=i", "set maxrecords, default is 10"],
["startrecord=i", "set startrecord, default is 1"],
["format" => hidden => {one_of => [
["with-format=s" => "with pronom format id"],
["pronom-id=s" => "with pronom format id"],
#["without-format=s" => "without pronom format id"],
] } ],
["validation" => hidden => {one_of => [
["with-valid-files" => "with valid files"],
["with-invalid-files" => "with at least one invalid file"],
] } ],
["viruscheck" => hidden => {one_of => [
["with-passed-viruschecks" => "with passed virus checks"],
["with-missed-viruschecks" => "with missed virus checks"],
["with-failed-viruschecks" => "with failed virus checks"],
]}],
);
}
sub validate_args {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment