PHPackages                             fiedsch/quancept-log-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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. fiedsch/quancept-log-parser

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

fiedsch/quancept-log-parser
===========================

a library with helpers for managing quancept cati log files

0.4.1(8y ago)012MITPHPPHP &gt;=7.1

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fiedsch/quancept-log-parser)[ Packagist](https://packagist.org/packages/fiedsch/quancept-log-parser)[ RSS](/packages/fiedsch-quancept-log-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Parse Quancept CATI log files
=============================

[](#parse-quancept-cati-log-files)

Quancept generates log files. Among these are `accounts.sms` and `.qca`.

This library provides classes that help to make parsing these files easier.

This is Work in Progress. If you find something missing or wrong, please consider opening an issue or even better make a pull request.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require "fiedsch/quancept-log-parser "
```

where `` is a versionstring like `0.2.0`.

### Example one parse `accounts.sms`

[](#example-one-parse-accountssms)

```
require __DIR__ . "/vendor/autoload.php";

use Fiedsch\Data\File\FixedWidthReader;
use Fiedsch\Data\File\Helper;
use Fiedsch\Quancept\Logs\Accounts;

$input = "/path/to/your/accounts.sms";

// the columns to be read from $input into our data array

$columns = [
    'interviewer' => ['from' => Accounts::INTERVIEWER_FROM, 'to' => Accounts::INTERVIEWER_TO],
    'kex'         => ['from' => Accounts::RECORD_KEY_FROM,  'to' => Accounts::RECORD_KEY_TO],
    'timestried'  => ['from' => Accounts::TIMESTRIED_FROM,  'to' => Accounts::TIMESTRIED_TO],
    'start_day'   => ['from' => Accounts::START_DATE_FROM,  'to' => Accounts::START_DATE_TO],
    'start_time'  => ['from' => Accounts::START_TIME_FROM,  'to' => Accounts::START_TIME_TO],
    'duration'    => ['from' => Accounts::DURATION_FROM,    'to' => Accounts::DURATION_TO],
    'tipcode'     => ['from' => Accounts::TIPCODE_FROM,     'to' => Accounts::TIPCODE_TO],
    'exitcode'    => ['from' => Accounts::EXITCODE_FROM,    'to' => Accounts::EXITCODE_TO],
    'queuename'   => ['from' => Accounts::QUEUENAME_FROM,   'to' => Accounts::QUEUENAME_TO],
];

// read file line by line

$reader = new FixedWidthReader($input, $columns);

$aggregated = [];

while (($line = $reader->getLine(FixedWidthReader::SKIP_EMPTY_LINES)) !== null) {
    // trim all data as they might contain surrounding spaces
    $data = array_map(function($el) { return trim($el); }, $line);
    // ignore lines generated by the QTS dialer with no interviewer interaction
    if ($data[0] === Accounts::AGENT_QTS) { continue; }
    // reorganize our data array such that the array keys are the names in $columns
    $data = Helper::setArrayKeys($data, array_keys($columns));
    // change numeric value to label
    if (isset(Accounts::EXITCODES[$data['exitcode']])) {
        $data['exitcode'] = Accounts::EXITCODES[$data['exitcode']];
    }
    // do something with $data here (e.g. aggregate values in $aggregated)
    // Fit to your needs!
}
```

Helpers
-------

[](#helpers)

### QcaResults

[](#qcaresults)

```
$results = new QcaResults();
// read lines of the `*.qca` file into $data
// for every line do:
    $results->addInterviewerRecord($data[Qca::USERNAME], $data);
    $results->addDayRecord(date("ymd", $data[Qca::INTERVIEWSTARTTIMESTAMP]), $data);
```

### AccountsResults

[](#accountsresults)

```
$results = new AccountsResults();
// read lines of the `accounts.sms` file into $data
// for every line do:
    $results->addInterviewerRecord($data[AccountsResults::INTERVIEWER], $data);
    $results->addDayRecord($data[AccountsResults::START_DAY], $data);
```

### Aggregation of QcaResults and AccountsResults

[](#aggregation-of-qcaresults-and-accountsresults)

- TODO

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

3003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/891f6b4103361b3226338d9cfa724277634fc04d0a3eb770b48f8bf2f288c690?d=identicon)[fiedsch](/maintainers/fiedsch)

---

Top Contributors

[![fiedsch](https://avatars.githubusercontent.com/u/5047601?v=4)](https://github.com/fiedsch "fiedsch (42 commits)")

---

Tags

logfileparsing-libraryquanceptdatacsvfixed widthlog filesquancept cati

### Embed Badge

![Health badge](/badges/fiedsch-quancept-log-parser/health.svg)

```
[![Health](https://phpackages.com/badges/fiedsch-quancept-log-parser/health.svg)](https://phpackages.com/packages/fiedsch-quancept-log-parser)
```

###  Alternatives

[sonata-project/exporter

Lightweight Exporter library

44920.9M35](/packages/sonata-project-exporter)[soapbox/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

2501.1M12](/packages/soapbox-laravel-formatter)[burnbright/silverstripe-importexport

An upgrade to SilverStripe's bulk loading and exporting

4534.1k1](/packages/burnbright-silverstripe-importexport)[akeneo-labs/data-generator-bundle

Akeneo PIM Bundle to generate data in order to test high volume operations

112.1k](/packages/akeneo-labs-data-generator-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
