PHPackages                             pdapps/kanbani-data - 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. pdapps/kanbani-data

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

pdapps/kanbani-data
===================

Kanbani data parsers for PHP

v1.0(5y ago)18MITPHPPHP &gt;=5.6.0

Since Sep 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PDApps/KanbaniDataPHP)[ Packagist](https://packagist.org/packages/pdapps/kanbani-data)[ Docs](https://pdapps.org/kanbani)[ RSS](/packages/pdapps-kanbani-data/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Kanbani data parsers for PHP
============================

[](#kanbani-data-parsers-for-php)

These scripts enable interop with [Kanbani](https://pdapps.org/kanbani) - a free task manager for Android. In particular, they are used in [Kanbani Web Viewer](https://pdapps.org/kanbani/web) - a simple Trello-like Kanbani board browser.

```
composer require pdapps/kanbani-data

```

Requirements
------------

[](#requirements)

- PHP 5.6 or 7.x
- `openssl` (if working with encrypted profiles)

What's inside
-------------

[](#whats-inside)

Scripts are independent. You can include only those that you need.

### `sync.php` - sync data manipulation

[](#syncphp---sync-data-manipulation)

Provides set of classes that allow reading and writing (unserializing and serializing) data produced by the Kanbani when doing sync (using any transport such as local file or WebDAV).

If the `openssl` PHP module is available, you can manipulate encrypted sync data as well as plain.

```
// Creating a sync file from scratch:
$syncData = new Kanbani\SyncData;
$syncData->boards = [$board1, $board2, ...];
$syncData->serializeFile('foobar.kanbani');
// Or, encrypted:
$syncData->serializeFile('foobar.kanbani', "TheSecretString");

// Reading an existing sync file:
$syncData = new Kanbani\SyncData;
$syncData->unserializeFile('foobar.kanbani');
// Or, if encrypted:
$syncData->unserializeFile('foobar.kanbani', "TheSecretString", "sOmOzK...");
echo count($syncData->boards);

// Can also chain like so:
$syncData = (new Kanbani\SyncData($boards))
    ->serializeFile(...);

$syncData = (new Kanbani\SyncData)
    ->unserializeFile(...);
```

Under the hood, `SyncData` is using `SyncFile` - a class that doesn't know what exactly it is serializing, only that it is some string. You can use the two separately:

```
// Get plain text JSON:
// {"sync_version": 1, "client_version": 1, "boards": [...]}
echo json_encode($syncData);

// Get CSV (to read back CSV use Kanbani Web Viewer's import plugin):
// board;agEi...P4F7;1577836800000;"Welcome Board";
echo $syncData->serializeToCSV();
```

Assuming that `$object` is in the format described [here](https://pdapps.org/kanbani/?lang=en#sync.html#json):

```
// Creating a sync file from scratch:
$data = json_encode($object);
(new Kanbani\SyncFile)->serializeFile("foobar.kanbani", $data);

// Reading an existing sync file:
$sync = (new Kanbani\SyncFile)->unserializeFile("foobar.kanbani");
$object = json_decode($sync->data);

// Reading file info only (faster, doesn't parse the data):
$syncFile = (new Kanbani\SyncFile)->unserializeHeader(file_get_contents(...));
echo $syncFile->isEncrypted() ? "Encrypted data" : "Plain text";
```

#### Helper methods

[](#helper-methods)

`SyncFile` can generate Kanbani-compatible files names for encrypted boards:

```
$syncFile = new Kanbani\SyncFile;
$syncFile->secret = "TheSecretString";
$syncFile->boardID = "sOmOzK...";
echo $syncFile->encryptedFileName(), ".kanbani";
```

`SyncData` can serialize (export) data in several other formats (it can't import them, see [Kanbani Web Viewer's import plugin for that](https://github.com/PDApps/KanbaniWebViewer/blob/master/plugins/import.php)):

```
$syncData->serializeToJSON();       // plain text JSON
$syncData->serializeToCSV();        // CSV format similar to Trello
$syncData->serializeToExcelCSV();   // CSV compatible with MS Excel
```

#### Command line usage

[](#command-line-usage)

Call `sync.php` directly from the command line to unserialize and dump a file (useful for debugging):

```
php sync.php Board.kanbani [secret board-id]

```

### `qrcode.php` - QR code data manipulation

[](#qrcodephp---qr-code-data-manipulation)

Provides set of classes that represent Kanbani's sync profile data when encoded as a QR code for sharing with other devices. It identifies the transport, server location, encryption settings and so on.

Note: a QR code holds JSON data; these classes work on such data but they do not scan or generate QR code images - use libraries like [phpqrcode](https://github.com/t0k4rt/phpqrcode) for that.

Generating QR code data from scratch:

```
$qrCode = new Kanbani\QrCodeData;
$qrCode->title = "Generated sync profile";

$baseURL = "https://deep.secret/kanbani/";
$auth = new Kanbani\QrCodePassword("PDApps", "4Ever!");
$qrCode->transport = new Kanbani\QrCodeSFTP($baseURL, $auth);

$data = json_encode($qrCode);

// $data can now be encoded as an image:
require_once "phpqrcode.php";
QRcode::png($data);
```

Parsing QR code data:

```
$qrCode = new Kanbani\QrCodeData;
$qrCode->unserialize(json_decode($data));
echo $qrCode->title;
echo get_class($qrCode->transport);
```

#### Helper methods

[](#helper-methods-1)

Some `QrCodeWebTransport`s have `testConnection()` method that returns `null` on success or array `["id", "msg"]` (error identifier and human readable message) - useful for checking user input.

```
$dav = new QrCodeWebDAV("https://dav.user.pdapps.org", null /*no auth*/);
$error = $dav->testConnection();
if ($error) {
    echo "Problem '$error[0]': $error[1]";
} else {
    echo "Connection test OK!";
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

2062d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15999910?v=4)[PDApps.org](/maintainers/PDApps)[@PDApps](https://github.com/PDApps)

---

Top Contributors

[![voronnate](https://avatars.githubusercontent.com/u/15999835?v=4)](https://github.com/voronnate "voronnate (3 commits)")

---

Tags

kanbani

### Embed Badge

![Health badge](/badges/pdapps-kanbani-data/health.svg)

```
[![Health](https://phpackages.com/badges/pdapps-kanbani-data/health.svg)](https://phpackages.com/packages/pdapps-kanbani-data)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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