PHPackages                             spojenet/abo-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. spojenet/abo-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

spojenet/abo-parser
===================

Czechoslovak ABO format parsing library

v0.1.0(8mo ago)14[5 PRs](https://github.com/Spoje-NET/php-abo-parser/pulls)MITPHPCI passing

Since Sep 6Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/Spoje-NET/php-abo-parser)[ Packagist](https://packagist.org/packages/spojenet/abo-parser)[ RSS](/packages/spojenet-abo-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (7)Used By (0)

PHP ABO Parser
==============

[](#php-abo-parser)

A PHP library for parsing Czechoslovak ABO (Account Bank Operations) format files commonly used by Czech and Slovak banks for financial data exchange.

[![PHP Version](https://camo.githubusercontent.com/d99323f769f72040b693c48a2dfaa9b767bae7f8dc307ac17c678e033fe4bdd8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d626c75652e737667)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Build Status](https://camo.githubusercontent.com/682afab3b97dc1b8915e602a8160198c33e13a857cfd20969f0b158a6174de8f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f53706f6a652d4e45542f7068702d61626f2d7061727365722f63692e796d6c3f6272616e63683d6d61696e)](https://github.com/Spoje-NET/php-abo-parser/actions)[![Coverage Status](https://camo.githubusercontent.com/d89ae9fbfd00794b7dc62590a371518eabd5afbcc5e2beb40764559752a3dd2a/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f53706f6a652d4e45542f7068702d61626f2d7061727365723f7374796c653d666c61742d737175617265)](https://codecov.io/gh/Spoje-NET/php-abo-parser)[![PHPStan Level](https://camo.githubusercontent.com/13203a9b8ebc6e91e3609e567b490df0bcdd5ee77b910130a8582dee4781b03b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253230362d626c756576696f6c65742e737667)](https://phpstan.org/)[![Downloads](https://camo.githubusercontent.com/3f69a3a0e0c5f1d3d65b801d6cc793fb1667346bcced1680fa575416498e5ed2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706f6a656e65742f61626f2d7061727365722e737667)](https://packagist.org/packages/spojenet/abo-parser)[![Last Commit](https://camo.githubusercontent.com/94aaddf52f9ab22c36f117b7c22ca30eee2ddbdb678d9dc51ce1b2b8d2af3068/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f53706f6a652d4e45542f7068702d61626f2d7061727365722e737667)](https://github.com/Spoje-NET/php-abo-parser/commits/main)

Features
--------

[](#features)

- **Dual Format Support**: Automatically detects and parses both basic and extended ABO formats
- **Complete Record Parsing**: Handles account statements (074 records) and transaction records (075 records)
- **Format Detection**: Automatically identifies which ABO format version is being used
- **Extended Format Fields**: Supports additional fields in extended format (message fields, ISO currency info, SWIFT codes, etc.)
- **Multiple Input Methods**: Read from files or stdin
- **Flexible Output**: Output to JSON format with pretty printing
- **Character Encoding Support**: Handles Czech/Slovak character encodings (Windows-1250, ISO-8859-2)
- **Command Line Tool**: Ready-to-use CLI script for ABO to JSON conversion
- **Type Safe**: Full PHP 8.4+ type hints and strict mode
- **PSR-4 Autoloading**: Composer compatible

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require spojenet/abo-parser
```

### Manual Installation

[](#manual-installation)

```
git clone https://github.com/Spoje-NET/php-abo-parser.git
cd php-abo-parser
composer install
```

Usage
-----

[](#usage)

### Command Line Tool

[](#command-line-tool)

The library includes a ready-to-use command line tool for converting ABO files to JSON:

```
# Show help
./Example/abo2json.php --help

# Convert ABO file to JSON (output to stdout)
./Example/abo2json.php --abofile data.abo

# Convert ABO file and save to JSON file
./Example/abo2json.php --abofile data.abo --jsonfile output.json

# Read from stdin and output to stdout
cat data.abo | ./Example/abo2json.php

# Read from stdin and save to file
cat data.abo | ./Example/abo2json.php --jsonfile output.json
```

#### Simple Example Script

[](#simple-example-script)

For a more detailed demonstration, use the included simple example:

```
# Run the simple example
./Example/simple_example.php path/to/your/file.abo

# Run and save JSON output
./Example/simple_example.php path/to/your/file.abo output.json
```

This script provides a human-readable summary of the parsed data.

### PHP Library API

[](#php-library-api)

#### Basic Usage

[](#basic-usage)

```
