Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christophwurst/kitinerary-bin
php binding to invoke a shipped kitinerary-extractor binary
https://github.com/christophwurst/kitinerary-bin
Last synced: 2 months ago
JSON representation
php binding to invoke a shipped kitinerary-extractor binary
- Host: GitHub
- URL: https://github.com/christophwurst/kitinerary-bin
- Owner: ChristophWurst
- License: lgpl-3.0
- Created: 2019-11-18T10:49:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-23T09:07:32.000Z (12 months ago)
- Last Synced: 2024-04-28T06:25:32.827Z (9 months ago)
- Language: PHP
- Size: 57.7 MB
- Stars: 1
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kitinerary-bin
Binary executable adapter for the [kitinerary extractor package](https://packagist.org/packages/christophwurst/kitinerary). This package provides an adapter that invokes a shipped [kitinerary-extractor](https://github.com/KDE/itinerary) executable on x86_64 Linux systems.
The statically linked binary is created [from source](https://invent.kde.org/vkrause/kitinerary-static-build).
## Installation
```sh
composer require christophwurst/kitinerary christophwurst/kitinerary-bin
```## Usage
```php
use ChristophWurst\KItinerary\ItineraryExtractor;
use ChristophWurst\KItinerary\Bin\BinaryAdapter;
use ChristophWurst\KItinerary\Exception\KItineraryRuntimeException;$adapter = new BinaryAdapter();
if (!$adapter->isAvailable()) {
// ...
}
$extractor = new Extractor($adapter);try {
$itinerary = $extractor->extractFromString('...');
} catch (KItineraryRuntimeException $e) {
// ...
}
```