Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christophwurst/kitinerary-sys
System executable adapter for the kitinerary extractor
https://github.com/christophwurst/kitinerary-sys
Last synced: 2 months ago
JSON representation
System executable adapter for the kitinerary extractor
- Host: GitHub
- URL: https://github.com/christophwurst/kitinerary-sys
- Owner: ChristophWurst
- License: lgpl-3.0
- Created: 2020-05-15T14:30:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T07:46:50.000Z (5 months ago)
- Last Synced: 2024-09-23T21:21:09.265Z (4 months ago)
- Language: PHP
- Size: 29.3 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kitinerary-sys
System executable adapter for the [kitinerary extractor package](https://packagist.org/packages/christophwurst/kitinerary). This package provides an adapter that invokes the binary installed on the system, e.g. with a Linux distribution's package manager.
## Installation
```sh
composer require christophwurst/kitinerary christophwurst/kitinerary-sys
```## Usage
```php
use ChristophWurst\KItinerary\ItineraryExtractor;
use ChristophWurst\KItinerary\Sys\SysAdapter;
use ChristophWurst\KItinerary\Exception\KItineraryRuntimeException;$adapter = new SysAdapter();
if (!$adapter->isAvailable()) {
// ...
}
$extractor = new Extractor($adapter);try {
$itinerary = $extractor->extractFromString('...');
} catch (KItineraryRuntimeException $e) {
// ...
}
```