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

- improved cli option grouping

parent e638e90d
No related branches found
No related tags found
No related merge requests found
...@@ -51,45 +51,56 @@ sub description { ...@@ -51,45 +51,56 @@ sub description {
} }
sub opt_spec { sub opt_spec {
return ( return (
[ "debug" => "enable user agent debug output" ], [ 'debug' => 'enable user agent debug output' ],
[ "output-format" => hidden => { [ 'output-format' => hidden => {
one_of => [ 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)' ],
[ "output-as-csv|C" => "prints output as Comma Separated Values (CSV)" ], [ 'output-as-raw|R' => 'enable full elasticsearch response' ],
[ "output-as-raw|R" => "enable full elasticsearch response" ], [ 'output-as-rsv|r' => 'prints output as Raw Strings Values (RSV) [default]' ],
], ],
} }
], ],
[], [],
[ "datemode" => hidden => { [ 'aip|a=s' => 'search a specific AIP by given AIP id' ],
[ 'datemode' => hidden => {
one_of => [ one_of => [
[ "creationdate|c=s" => "search based on creationdate string" ], [ 'creationdate|c=s' => 'search based on creationdate string' ],
[ "modificationdate|m=s" => "search based on modificationdate 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)' ],
[ "descriptive|d=s", "search descriptive metadata (dc identifier)" ], [ 'lzaid|l=s', 'search a specific AIP by given LZA id' ],
[ "source|s=s", "search source metadata" ], [ 'maxrecords=i', 'set maxrecords, default is 10', { default => 10 } ],
[ "aip|a=s" => "search a specific AIP by given AIP id" ], [ 'source|s=s', 'search source metadata' ],
[ "maxrecords=i", "set maxrecords, default is 10", { default => 10 } ], [ 'startrecord=i', 'set startrecord, default is 1' ],
[ "startrecord=i", "set startrecord, default is 1" ], [ 'format' => hidden => { one_of => [
[ "format" => hidden => { one_of => [ [ 'pronom-id|p=s' => 'with pronom format id' ],
[ "pronom-id|p=s" => "with pronom format id" ], #['without-format=s' => 'without pronom format id'],
#["without-format=s" => "without pronom format id"],
] } ], ] } ],
[], [],
[ "with-lzaid" => "also returns lzaid" ], [ 'with-LDP-collection' => 'also returns AIP LDP collection' ],
[ "with-path" => "also returns AIP path" ], [ 'with-LDP-funder' => 'also returns AIP LDP funder' ],
[ "with-size" => "also returns AIP size" ], [ 'with-LDP-lender' => 'also returns AIP LDP lender' ],
[ "with-filecount" => "also returns AIPs file count" ], [ 'with-LDP-project' => 'also returns AIP LDP project' ],
[ "with-export2archive-date" => "also returns AIP export to archive date" ], [ 'with-archival-value-description' => 'also returns AIP archival value description' ],
[ "with-creationdate" => "also returns AIP creation date" ], [ 'with-creationdate' => 'also returns AIP creation date' ],
[ "with-score" => "also returns score of Elastic Search match (higher => better)"], [ 'with-export2archive-date' => 'also returns AIP export to archive date' ],
[ 'with-filecount' => 'also returns AIPs file count' ],
[ 'with-location' => 'also returns AIP location' ],
[ 'with-lzaid' => 'also returns lzaid' ],
[ 'with-migrated-AIP' => 'also returns AIP migrated state' ],
[ 'with-origin-AIS' => 'also returns AIP origin AIS if migrated' ],
[ 'with-path' => 'also returns AIP path' ],
[ 'with-previous-AIP' => 'also returns AIP predecessor if updated' ],
[ 'with-score' => 'also returns score of Elastic Search match (higher => better)' ],
[ 'with-size' => 'also returns AIP size' ],
[ 'with-status' => 'also returns AIP state in AIS' ],
[ 'with-title' => 'also returns AIP title' ],
[], [],
[ 'help|h', "print usage message and exit", { shortcircuit => 1 } ], [ 'help|h', 'print usage message and exit', { shortcircuit => 1 } ],
[ 'version|v', "print version information", { shortcircuit => 1 } ], [ 'target-version|V' => 'get current elasticsearch version', { shortcircuit => 1 } ],
[ "target-version|V" => "get current elasticsearch version", { shortcircuit => 1 } ], [ 'version|v', 'print version information', { shortcircuit => 1 } ],
); );
} }
sub validate_args { sub validate_args {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment