Skip to content

Command line utility for converting autogiro files to XML.

License

Notifications You must be signed in to change notification settings

byrokrat/autogiro2xml

Repository files navigation

byrokrat

autogiro2xml

Packagist Version Build Status

Command line utility for converting autogiro files to XML.

Installation

Using phive (recommended)

Install using phive:

phive install byrokrat/autogiro2xml

As a phar archive

Download the latest version from the github releases page.

Optionally rename autogiro2xml.phar to autogiro2xml for a smoother experience.

Using composer

Install as a composer dependency:

composer require byrokrat/autogiro2xml

This will make autogiro2xml avaliable as vendor/bin/autogiro2xml.

From source

To build you need make

make
sudo make install

The build script uses composer to handle dependencies and phive to handle build tools. If they are not installed as composer or phive respectivly you can use something like

make COMPOSER_CMD=./composer.phar PHIVE_CMD=./phive.phar

Usage

Transforming an autogiro file to XML.

autogiro2xml <filename>

Works well with *nix streams and pipes.

cat filename | autogiro2xml > output.xml

Validate autogiro files using the --format=validate option.

autogiro2xml --format=validate <filename>

You may pass multiple file or directory names.

autogiro2xml --format=validate /dir/with/ag/files

Use the --stop-on-failure option to stop processing once a broken file is found.

autogiro2xml --format=validate --stop-on-failure /dir/with/ag/files

Parse a directory of autogiro files and save error descriptions

autogiro2xml --format=validate <dirname> 2> errors.txt

For the complete help see

autogiro2xml --help