The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

kamstrup-kem-split - Splits an encrypted delivery file from Kamstrup into separate XML files with device information

SYNOPSIS

    ./kamstrup-kem-split.pl --key=<key> [--config=<configfile> --kem=1] inputfile_from_backend

DESCRIPTION

This script takes as input a delivery file from Kamstrup (encrypted, compressed KEM file), unpacks it and splits the file into different decoded XML files that can be further processed.

Minimal input to the script are the encryption key and the input file. If no further configuration file is passed then all information in the input file is written to the output file.

A configuration file consists of a CSV file with `;` as delimeter and the following columns:

kamstrup_ordernr;kamstrup_serial_number_start;kamstrup_serial_number_end;number_of_devices;internal_batch_number

The output file name will be [kamstrup_ordernr]_[internal_batch_number].

Please note that order splitting si only supported for KEM files and not for the default KEM2 files.

Note that this script support the KEM2 file format by default. If you want to process an older KEM file, please configure the script as such via the commandline.

AUTHOR

Lieven Hollevoet <lieven@quicksand.be>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Lieven Hollevoet.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.