Select Git revision
report.pm 26.24 KiB
package SLUB::LZA::TA::Command::report;
use SLUB::LZA::TA -command;
use v5.36;
use SLUB::LZA::TA::Archivematica::Elasticsearch;
use SLUB::LZA::TA::Archivematica::Elasticsearch::PrepareQuery;
use SLUB::LZA::TA::Output;
use Date::Calc qw(Date_to_Time Today Add_Delta_YM Add_Delta_YMD Day_of_Week);
use namespace::autoclean -except => qr{SLUB::LZA::TA::.*};
# VERSION
# ABSTRACT: report module for ta-tool
use constant {
FULL => 0,
LDP => 1,
NO_LDP => 2,
};
use constant SETS => (
"total",
"LDP only",
"no LDP",
);
use constant {
NEW => 0,
UPDATE => 1,
TOTAL => 2
};
use constant AIPSTATE => (
"first ingest",
"AIP update",
"all AIPs"
);
use constant {
COUNT => 0,
FILES => 1,
SIZE => 2,
PAYLOAD_FILES => 3,
PAYLOAD_SIZE => 4,
};
use constant FLAVOURS => (
"count of aips",
"count of files",
"size in B",
"count of payload files",
"payload size in B"
);
sub abstract { return "print AIP reports about Archival Information System (AIS)";}
my $base_cmd = "$0 report";
my $dummycmd = " "x length($base_cmd);
my $description=<<"DESCR";
Ask an AIS for some statistics about AIPs.
Overview:
$base_cmd [--daily| --weekly | --monthly | --yearly] [--workflow WORKFLOW]
([--with-ldp] [--with-filetypes])
$dummycmd --version
$dummycmd --help
Examples:
* Report statistics of AIPs last month for workflow Kitodo
'$base_cmd --monthly --workflow Kitodo'
* Report statistics of AIPs last year
'$base_cmd --yearly'