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
da6f3167
Commit
da6f3167
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- splitted --creationdate to --creationdate-from and --creationdate-to
parent
4e58bff2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SLUB/LZA/TA/Command/search.pm
+23
-2
23 additions, 2 deletions
lib/SLUB/LZA/TA/Command/search.pm
with
23 additions
and
2 deletions
lib/SLUB/LZA/TA/Command/search.pm
+
23
−
2
View file @
da6f3167
...
@@ -55,11 +55,14 @@ sub opt_spec {
...
@@ -55,11 +55,14 @@ sub opt_spec {
[
'
aip|a=s
'
=>
'
search a specific AIP by given AIP id
'
],
[
'
aip|a=s
'
=>
'
search a specific AIP by given AIP id
'
],
[
'
datemode
'
=>
hidden
=>
{
[
'
datemode
'
=>
hidden
=>
{
one_of
=>
[
one_of
=>
[
[
'
creationdate|c=s
'
=>
'
search based on creation date in format "YYYY-MM-DD", ranges in format "YYYY-MM-DD...YYYY-MM-DD"
'
],
[
'
creationdate|c=s
'
=>
'
search based on creation date in format "YYYY-MM-DD"
'
],
[
'
creationdate-from=s
'
=>
'
search based on creation date ranges, beginning date in format "YYYY-MM-DD", implies "--creationdate-to"
'],
#[ 'modificationdate|m=s' => 'search based on modificationdate string' ]
#[ 'modificationdate|m=s' => 'search based on modificationdate string' ]
]
]
}
}
],
],
[
'
creationdate-to=s
'
=>
'
search based on creation date ranges, beginning date in format "YYYY-MM-DD", implies "--creationdate-from"
',
{
implies
=>
'
creationdate_from
'
}],
[
'
descriptive|d=s
',
'
search descriptive metadata, using exact match
'
],
[
'
descriptive|d=s
',
'
search descriptive metadata, using exact match
'
],
[
'
fuzzy|f=s
',
'
search descriptive metadata, using phrase prefix match
'
],
[
'
fuzzy|f=s
',
'
search descriptive metadata, using phrase prefix match
'
],
[
'
lzaid|l=s
',
'
search a specific AIP by given LZA id
'
],
[
'
lzaid|l=s
',
'
search a specific AIP by given LZA id
'
],
...
@@ -132,7 +135,25 @@ sub validate_args {
...
@@ -132,7 +135,25 @@ sub validate_args {
$opt
->
{
creationdate_epochs
}
->
{
from
}
=
$from_epoch
;
$opt
->
{
creationdate_epochs
}
->
{
from
}
=
$from_epoch
;
$opt
->
{
creationdate_epochs
}
->
{
to
}
=
$to_epoch
;
$opt
->
{
creationdate_epochs
}
->
{
to
}
=
$to_epoch
;
}
else
{
}
else
{
$self
->
usage_error
('
--creationdate expects date in format "YYYY-MM-DD", ranges in format "YYYY-MM-DD...YYYY-MM-DD"
');
$self
->
usage_error
('
--creationdate expects date in format "YYYY-MM-DD"
');
}
}
if
(
exists
$opt
->
{
creationdate_from
})
{
$self
->
usage_error
('
--creationdate-from implies --creationdate-to"
')
unless
exists
$opt
->
{
creationdate_to
};
if
(
$opt
->
{
creationdate_from
}
=~
m/^(\d{4})-(\d{2})-(\d{2})$/
)
{
my
$from_epoch
=
Date_to_Time
(
$
1
,
$
2
,
$
3
,
0
,
0
,
0
);
$opt
->
{
creationdate_epochs
}
->
{
from
}
=
$from_epoch
;
}
else
{
$self
->
usage_error
('
--creationdate-from expects date in format "YYYY-MM-DD"
');
}
}
if
(
exists
$opt
->
{
creationdate_to
})
{
$self
->
usage_error
('
--creationdate-to implies --creationdate-from"
')
unless
exists
$opt
->
{
creationdate_from
};
if
(
$opt
->
{
creationdate_from
}
=~
m/^(\d{4})-(\d{2})-(\d{2})$/
)
{
my
$to_epoch
=
Date_to_Time
(
$
1
,
$
2
,
$
3
,
23
,
59
,
59
);
$opt
->
{
creationdate_epochs
}
->
{
to
}
=
$to_epoch
;
}
else
{
$self
->
usage_error
('
--creationdate-to expects date in format "YYYY-MM-DD"
');
}
}
}
}
if
(
exists
$opt
->
{
pronom_id
})
{
if
(
exists
$opt
->
{
pronom_id
})
{
...
...
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