Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools for technical analysts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
tools for technical analysts
Commits
eb95cd82
Commit
eb95cd82
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added global opts
parent
9d6fa761
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/SLUB/LZA/TA/Command/count.pm
+3
-6
3 additions, 6 deletions
lib/SLUB/LZA/TA/Command/count.pm
lib/SLUB/LZA/TA/Command/report.pm
+3
-3
3 additions, 3 deletions
lib/SLUB/LZA/TA/Command/report.pm
lib/SLUB/LZA/TA/Command/search.pm
+4
-8
4 additions, 8 deletions
lib/SLUB/LZA/TA/Command/search.pm
with
10 additions
and
17 deletions
lib/SLUB/LZA/TA/Command/count.pm
+
3
−
6
View file @
eb95cd82
...
@@ -31,7 +31,8 @@ sub description {
...
@@ -31,7 +31,8 @@ sub description {
return
"
$description
"
return
"
$description
"
}
}
sub
opt_spec
{
sub
opt_spec
{
return
(
my
@global_opts
=
SLUB::LZA::TA::
common_global_opt_spec
();
my
@local_opts
=
(
#["source|s=s" => "count based on string search in source metadata"],
#["source|s=s" => "count based on string search in source metadata"],
["
aip|a=s
"
=>
"
count AIPs by given AIP id
"],
["
aip|a=s
"
=>
"
count AIPs by given AIP id
"],
[
'
datemode
'
=>
hidden
=>
{
[
'
datemode
'
=>
hidden
=>
{
...
@@ -60,15 +61,11 @@ sub opt_spec {
...
@@ -60,15 +61,11 @@ sub opt_spec {
[
'
only-ldp
',
'
only if AIP is LDP funded
'
],
[
'
only-ldp
',
'
only if AIP is LDP funded
'
],
[
'
no-ldp
',
'
only if AIP is not LDP funded
'
],
[
'
no-ldp
',
'
only if AIP is not LDP funded
'
],
]
}
],
]
}
],
[]
,
[]
,
[
'
help|h
',
'
print usage message and exit
',
{
shortcircuit
=>
1
}
],
[
'
version|v
',
'
print version information
',
{
shortcircuit
=>
1
}
],
);
);
return
(
@global_opts
,
[]
,
@local_opts
);
}
}
sub
validate_args
{
sub
validate_args
{
my
(
$self
,
$opt
,
$args
)
=
@_
;
my
(
$self
,
$opt
,
$args
)
=
@_
;
SLUB::LZA::TA::
validate_global
(
@
_
);
# no args allowed but options!
# no args allowed but options!
$self
->
usage_error
("
No args allowed
")
if
@$args
;
$self
->
usage_error
("
No args allowed
")
if
@$args
;
if
(
exists
$opt
->
{
creationdate
})
{
if
(
exists
$opt
->
{
creationdate
})
{
...
...
This diff is collapsed.
Click to expand it.
lib/SLUB/LZA/TA/Command/report.pm
+
3
−
3
View file @
eb95cd82
...
@@ -42,7 +42,8 @@ sub description {
...
@@ -42,7 +42,8 @@ sub description {
return
"
$description
"
return
"
$description
"
}
}
sub
opt_spec
{
sub
opt_spec
{
return
(
my
@global_opts
=
SLUB::LZA::TA::
common_global_opt_spec
();
my
@local_opts
=
(
[
'
datemode
'
=>
hidden
=>
{
[
'
datemode
'
=>
hidden
=>
{
one_of
=>
[
one_of
=>
[
[
'
daily|d
'
=>
'
report based on last day
'],
[
'
daily|d
'
=>
'
report based on last day
'],
...
@@ -68,9 +69,8 @@ sub opt_spec {
...
@@ -68,9 +69,8 @@ sub opt_spec {
[
'
with-ldp|l
'
=>
'
report with LDP
'],
[
'
with-ldp|l
'
=>
'
report with LDP
'],
[
'
workflow|w=s
'
=>
'
LZA internal workflow name (optional)
'],
[
'
workflow|w=s
'
=>
'
LZA internal workflow name (optional)
'],
[]
,
[]
,
[
'
help|h
',
'
print usage message and exit
',
{
shortcircuit
=>
1
}
],
[
'
version|v
',
'
print version information
',
{
shortcircuit
=>
1
}
],
);
);
return
(
@global_opts
,
[]
,
@local_opts
);
}
}
sub
validate_args
{
sub
validate_args
{
my
(
$self
,
$opt
,
$args
)
=
@_
;
my
(
$self
,
$opt
,
$args
)
=
@_
;
...
...
This diff is collapsed.
Click to expand it.
lib/SLUB/LZA/TA/Command/search.pm
+
4
−
8
View file @
eb95cd82
...
@@ -45,7 +45,8 @@ sub description {
...
@@ -45,7 +45,8 @@ sub description {
return
"
$description
"
return
"
$description
"
}
}
sub
opt_spec
{
sub
opt_spec
{
return
(
my
@global_opts
=
SLUB::LZA::TA::
common_global_opt_spec
();
my
@local_opts
=
(
[
'
output-format
'
=>
hidden
=>
{
[
'
output-format
'
=>
hidden
=>
{
one_of
=>
[
one_of
=>
[
[
'
output-as-csv|C
'
=>
'
prints output as Comma Separated Values (CSV)
'
],
[
'
output-as-csv|C
'
=>
'
prints output as Comma Separated Values (CSV)
'
],
...
@@ -114,17 +115,13 @@ sub opt_spec {
...
@@ -114,17 +115,13 @@ sub opt_spec {
[
'
with-slubarchiv-sipversion
'
=>
'
also returns AIP slubarchiv-sipversion
'],
[
'
with-slubarchiv-sipversion
'
=>
'
also returns AIP slubarchiv-sipversion
'],
[
'
with-status
'
=>
'
also returns AIP state in AIS
'
],
[
'
with-status
'
=>
'
also returns AIP state in AIS
'
],
[
'
with-title
'
=>
'
also returns AIP title
'
],
[
'
with-title
'
=>
'
also returns AIP title
'
],
[]
,
[
'
help|h
',
'
print usage message and exit
',
{
shortcircuit
=>
1
}
],
[
'
version|v
',
'
print version information
',
{
shortcircuit
=>
1
}
],
);
);
return
(
@global_opts
,
[]
,
@local_opts
);
}
}
sub
validate_args
{
sub
validate_args
{
my
(
$self
,
$opt
,
$args
)
=
@_
;
my
(
$self
,
$opt
,
$args
)
=
@_
;
# no args allowed but options!
# no args allowed but options!
$self
->
usage_error
("
No args allowed
")
if
@$args
;
$self
->
usage_error
("
No args allowed
")
if
@$args
;
SLUB::LZA::TA::
validate_global
(
@
_
);
if
(
exists
$opt
->
{
creationdate
})
{
if
(
exists
$opt
->
{
creationdate
})
{
if
(
$opt
->
{
creationdate
}
=~
m/^(\d{4})-(\d{2})-(\d{2})$/
)
{
if
(
$opt
->
{
creationdate
}
=~
m/^(\d{4})-(\d{2})-(\d{2})$/
)
{
my
$from_epoch
=
Date_to_Time
(
$
1
,
$
2
,
$
3
,
0
,
0
,
0
);
my
$from_epoch
=
Date_to_Time
(
$
1
,
$
2
,
$
3
,
0
,
0
,
0
);
...
@@ -214,7 +211,6 @@ sub execute {
...
@@ -214,7 +211,6 @@ sub execute {
#p($aips_response);
#p($aips_response);
SLUB::LZA::TA::Output::
print_results
(
$aips_response
,
$opt
);
SLUB::LZA::TA::Output::
print_results
(
$aips_response
,
$opt
);
return
1
;
return
1
;
}
}
1
;
1
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment