nextcloud / kitinerary-bin
KItinerary binary executable
v1.0.3
2024-03-25 09:26 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- nextcloud/kitinerary: ^1.0
- psr/log: ^1.1|^2.0|^3.0
README
kitinerary-bin
Binary executable adapter for the kitinerary extractor package. This package provides an adapter that invokes a shipped kitinerary-extractor executable on x86_64 Linux systems.
The statically linked binary is created from source.
Installation
composer require nextcloud/kitinerary nextcloud/kitinerary-bin
Usage
use Nextcloud\KItinerary\ItineraryExtractor; use Nextcloud\KItinerary\Bin\BinaryAdapter; use Nextcloud\KItinerary\Exception\KItineraryRuntimeException; $adapter = new BinaryAdapter(); if (!$adapter->isAvailable()) { // ... } $extractor = new Extractor($adapter); try { $itinerary = $extractor->extractFromString('...'); } catch (KItineraryRuntimeException $e) { // ... }