Skip to content
Snippets Groups Projects
Select Git revision
  • f327a8079f236e4a681b6ec22f149944eb5ade16
  • master default protected
  • diag
  • version1.3-archivematica
  • version1.2-archivematica
  • version1.1-archivematica
  • version1.0-archivematica
  • version1.0-rosetta
8 results

report.pm

Blame
  • 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'