dnb / wikibase-converter
Converts GND PICA into Wikibase items
Requires
- php: >=7.4
- ext-json: *
- opis/json-schema: ^2.3.0
- symfony/polyfill-php80: ^1.22.1
Requires (Dev)
- phpstan/phpstan: ^1.8.2
- phpunit/phpunit: ^9.5.21
- vimeo/psalm: ^4.3.0
This package is auto-updated.
Last update: 2024-12-16 17:30:26 UTC
README
PHP library that provides services to convert GND items in PICA+ format to a structure ready for import into Wikibase.
GND Wikibase Converter was created by Professional.Wiki for the German National Library.
Installation
This library can be used in your projects via the Composer dependency manager.
The package name is dnb/wikibase-converter
. Minimal example of a composer.json
file:
{ "require": { "dnb/wikibase-converter": "~1.0" } }
Usage
PICA+ JSON to Wikibase-like data structure
use DNB\WikibaseConverter\PicaConverter; $gndItem = PicaConverter::newWithDefaultMapping()->picaJsonToGndItem( $string ); $gndItem->getPropertyIds(); $gndItem->getStatementsForProperty( 'P123' );
Development
Start by installing the project dependencies by executing
composer update
You can run the tests by executing
make test
You can run the style checks by executing
make cs
To run all CI checks, execute
make ci
You can also invoke PHPUnit directly to pass it arguments, as follows
vendor/bin/phpunit --filter SomeClassNameOrFilter
Release notes
Version 0.1.0
Under development