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
98b26de0
Commit
98b26de0
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- minor to make script runnable
parent
fe354882
Branches
Branches containing commit
Tags
Tags containing commit
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
+4
-4
4 additions, 4 deletions
lib/SLUB/LZA/TA/Command/count.pm
lib/SLUB/LZA/TA/Command/search.pm
+30
-15
30 additions, 15 deletions
lib/SLUB/LZA/TA/Command/search.pm
lib/SLUB/LZA/TA/Log.pm
+1
-1
1 addition, 1 deletion
lib/SLUB/LZA/TA/Log.pm
with
35 additions
and
20 deletions
lib/SLUB/LZA/TA/Command/count.pm
+
4
−
4
View file @
98b26de0
...
@@ -3,8 +3,8 @@ use SLUB::LZA::TA -command;
...
@@ -3,8 +3,8 @@ use SLUB::LZA::TA -command;
use
strict
;
use
strict
;
use
warnings
;
use
warnings
;
use
feature
qw(say)
;
use
feature
qw(say)
;
use
SLUB::LZA::TA::
common_sru
;
use
SLUB::LZA::TA::
Rosetta::
common_sru
;
use
SLUB::LZA::TA::
SRU
;
use
SLUB::LZA::TA::
Rosetta::
SRU
;
# VERSION
# VERSION
...
@@ -73,8 +73,8 @@ sub execute {
...
@@ -73,8 +73,8 @@ sub execute {
my
(
$self
,
$opt
,
$args
)
=
@_
;
my
(
$self
,
$opt
,
$args
)
=
@_
;
my
$maxrecords
=
"
0
";
my
$maxrecords
=
"
0
";
my
$startrecord
=
1
;
my
$startrecord
=
1
;
my
$query
=
SLUB::LZA::TA::common_sru::
prepare_query
(
$opt
);
my
$query
=
SLUB::LZA::TA::
Rosetta::
common_sru::
prepare_query
(
$opt
);
my
$response
=
SLUB::LZA::TA::SRU::
sru_search
('
ie
',
$query
,
$startrecord
,
$maxrecords
,
$opt
->
{
verbose
},
$opt
->
{
debug
});
my
$response
=
SLUB::LZA::TA::
Rosetta::
SRU::
sru_search
('
ie
',
$query
,
$startrecord
,
$maxrecords
,
$opt
->
{
verbose
},
$opt
->
{
debug
});
$response
=~
s|.*?<numberOfRecords>(\d+)</numberOfRecords.*|$1|s
;
$response
=~
s|.*?<numberOfRecords>(\d+)</numberOfRecords.*|$1|s
;
say
$response
;
say
$response
;
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/SLUB/LZA/TA/Command/search.pm
+
30
−
15
View file @
98b26de0
...
@@ -3,8 +3,9 @@ use SLUB::LZA::TA -command;
...
@@ -3,8 +3,9 @@ use SLUB::LZA::TA -command;
use
strict
;
use
strict
;
use
warnings
;
use
warnings
;
use
feature
qw(say)
;
use
feature
qw(say)
;
use
SLUB::LZA::TA::
common_sru
;
#use SLUB::LZA::TA::common_sru;
use
SLUB::LZA::TA::
SRU
;
#use SLUB::LZA::TA::SRU;
use
SLUB::LZA::TA::Archivematica::
Elasticsearch
;
...
@@ -12,28 +13,28 @@ use SLUB::LZA::TA::SRU;
...
@@ -12,28 +13,28 @@ use SLUB::LZA::TA::SRU;
# ABSTRACT: search IEs module for ta-tool
# ABSTRACT: search IEs module for ta-tool
sub
abstract
{"
searches
Rosetta based
Archival Information System
";}
sub
abstract
{"
searches Archival Information System
(AIS)
";}
my
$description
=
<<"DESCR";
my
$description
=
<<"DESCR";
Searches a
Rosetta-based
AIS for descriptive oder source metadata on behalf of the Technical Analyst.
Searches a
n
AIS for descriptive oder source metadata on behalf of the Technical Analyst.
Returns SRU-response including dc-records. Only the first 10 matches will be presented by default.
Returns SRU-response including dc-records. Only the first 10 matches will be presented by default.
Examples:
Examples:
* Is this dc identifier in
A
rchiv?
* Is this dc identifier in
a
rchiv
e
?
$0 count -d SLUB:LZA:Kitodo:kitodo:422766
$0 count -d SLUB:LZA:Kitodo:kitodo:422766
* Which
IE PID
has this dc identifier?
* Which
AIP
has this dc identifier?
$0 search -d SLUB:LZA:Kitodo:kitodo:422766
$0 search -d SLUB:LZA:Kitodo:kitodo:422766
* Which
IE PID
are public domain?
* Which
AIPs
are public domain?
$0 search -s publicdomain
$0 search -s publicdomain
* Which
IE PID
are copyrighted?
* Which
AIPs
are copyrighted?
$0 search -s copyrighted
$0 search -s copyrighted
* Which
IE
s were modified in 2021-05-31?
* Which
AIP
s were modified in 2021-05-31?
$0 search -m 2021-05-31
$0 search -m 2021-05-31
Which
IE
s have at least one invalid file?
Which
AIP
s have at least one invalid file?
$0 search --with-invalid-files
$0 search --with-invalid-files
* Which
IE
s with mkv-files are in archive?
* Which
AIP
s with mkv-files are in archive?
$0 search --with-format=fmt/569
$0 search --with-format=fmt/569
* Which
IE
s have at least one file without virus check?
* Which
AIP
s have at least one file without virus check?
$0 search --with-missed-viruscheck
$0 search --with-missed-viruscheck
DESCR
DESCR
...
@@ -48,9 +49,10 @@ sub opt_spec {
...
@@ -48,9 +49,10 @@ sub opt_spec {
["
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)
"],
[
"
source|s=s
",
"
search source metadata
"],
[
"
source|s=s
",
"
search source metadata
"],
["
ie|i
=s
"
=>
"
search a specific
IE
"],
["
aip|a
=s
"
=>
"
search a specific
AIP by given AIP id
"],
["
maxrecords=i
",
"
set maxrecords, default is 10
"],
["
maxrecords=i
",
"
set maxrecords, default is 10
"],
["
startrecord=i
",
"
set startrecord, default is 1
"],
["
startrecord=i
",
"
set startrecord, default is 1
"],
["
format
"
=>
hidden
=>
{
one_of
=>
[
["
format
"
=>
hidden
=>
{
one_of
=>
[
...
@@ -86,9 +88,22 @@ sub execute {
...
@@ -86,9 +88,22 @@ sub execute {
if
(
exists
$opt
->
{
startrecord
})
{
if
(
exists
$opt
->
{
startrecord
})
{
$startrecord
=
$opt
->
{
startrecord
};
$startrecord
=
$opt
->
{
startrecord
};
}
}
my
$query
=
SLUB::LZA::TA::common_sru::
prepare_query
(
$opt
);
my
$query
=
SLUB::LZA::TA::Archivematica::Elasticsearch::
prepare_query
(
$opt
);
my
$response
=
SLUB::LZA::TA::SRU::
sru_search
('
ie
',
$query
,
$startrecord
,
$maxrecords
,
$opt
->
{
verbose
},
$opt
->
{
debug
},
$opt
->
{
user
},
$opt
->
{
password
});
use
Data::
Printer
;
p
(
%
SLUB::LZA::TA::
config
);
my
$response
=
SLUB::LZA::TA::Archivematica::Elasticsearch::
query_elasticsearch
(
$
SLUB::LZA::TA::
config
{
elasticsearchprotocol
},
$
SLUB::LZA::TA::
config
{
elasticsearchhost
},
$
SLUB::LZA::TA::
config
{
elasticsearchport
},
'
aips
',
# indexname
$query
,
# query_hash
);
#my $query = SLUB::LZA::TA::Rosetta::common_sru::prepare_query($opt);
#my $response = SLUB::LZA::TA::Rosetta::SRU::sru_search('ie', $query, $startrecord, $maxrecords, $opt->{verbose}, $opt->{debug}, $opt->{user}, $opt->{password});
say
$response
;
say
$response
;
use
Data::
Printer
;
p
(
$response
);
}
}
1
;
1
;
This diff is collapsed.
Click to expand it.
lib/SLUB/LZA/TA/Log.pm
+
1
−
1
View file @
98b26de0
...
@@ -2,7 +2,7 @@ package SLUB::LZA::TA::Log;
...
@@ -2,7 +2,7 @@ package SLUB::LZA::TA::Log;
use
strict
;
use
strict
;
use
warnings
;
use
warnings
;
use
feature
qw(say)
;
use
feature
qw(say)
;
use
SLUB::LZA::TA::
SOAP
;
#
use SLUB::LZA::TA::SOAP;
use
Path::
Tiny
;
use
Path::
Tiny
;
use
namespace::
autoclean
;
use
namespace::
autoclean
;
...
...
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