https://github.com/professionalwiki/gnd-wikibase-converter
Converts GND PICA into Wikibase items
https://github.com/professionalwiki/gnd-wikibase-converter
gnd wikibase
Last synced: 3 months ago
JSON representation
Converts GND PICA into Wikibase items
- Host: GitHub
- URL: https://github.com/professionalwiki/gnd-wikibase-converter
- Owner: ProfessionalWiki
- Created: 2020-12-01T22:11:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-16T13:14:12.000Z (over 3 years ago)
- Last Synced: 2025-06-26T12:09:24.470Z (12 months ago)
- Topics: gnd, wikibase
- Language: PHP
- Homepage: https://wikibase.consulting
- Size: 302 KB
- Stars: 2
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GND Wikibase Converter
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].
[](https://github.com/ProfessionalWiki/gnd-wikibase-converter/actions?query=workflow%3ACI)
[](https://shepherd.dev/github/ProfessionalWiki/gnd-wikibase-converter)
[](https://codecov.io/gh/ProfessionalWiki/gnd-wikibase-converter)
[](https://packagist.org/packages/dnb/wikibase-converter)
[](https://packagist.org/packages/dnb/wikibase-converter)
## 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:
```json
{
"require": {
"dnb/wikibase-converter": "~1.0"
}
}
```
## Usage
PICA+ JSON to Wikibase-like data structure
```php
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
[Professional.Wiki]: https://professional.wiki
[Composer dependency manager]: https://getcomposer.org/
[German National Library]: https://www.dnb.de/
[Wikibase]: https://wikibase.consulting/what-is-wikibase/
[GND]: https://www.dnb.de/EN/Professionell/Standardisierung/GND/gnd_node.html