acdh-oeaw / arche-ref-sources
Library for fetching data from external reference sources
1.1.3
2026-03-18 13:34 UTC
Requires
- php: ^8.1
- acdh-oeaw/arche-assets: ^3.22.0
- acdh-oeaw/arche-lib: ^7
- acdh-oeaw/uri-normalizer: ^4
- psr/log: ^3
- zozlak/argparse: ^1
- zozlak/logging: ^1.0
Requires (Dev)
- acdh-oeaw/arche-lib-ingest: ^4.0 | ^5.0
- phpstan/phpstan: *
- phpunit/phpunit: ^10
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A script for enhancing an ARCHE Suite repository data with information gathered from external reference sources (Geonames, GND, wikidata, etc.).
It works by resolving existing identifiers that are external reference source URIs, fetching information from there and updating a corresponding ARCHE Suite repository resource.
Installation
- run
composer require acdh-oeaw/arche-ref-sources
or
- clone this repo and enter its directory
- run
composer update
Configuration
See the config-sample.yaml provided by this repository for an example.
Running
- If you installed using composer:
vendor/bin/arche-ref-sourcesin the directory where you run thecomposercommand. - If you cloned this repo:
php -f arche-ref-sourcesin the directory containing the repository.
Remarks (substitute {arche-ref-source} according to the instruction above):
- Run
{arche-ref-source} --helpto get the list of available options. - Run
{arche-ref-source} {all the parameters you may want} pathToConfigFile.yaml- You need a configuration file. You can use
config-sample.yamlprovided by this repository as a base (it contains useful comments). - For starters you will probably want to stick to the default
parsemode (only fetch data from the external source but don't try to update ARCHE) with--verbose(to see what has been fetched and extracted) and maybe--output(so what has been fetched and extracted is saved in a TTL file you can use later on) - For filtering resources you can use
--id(process exactly one resource with a given id; id namespace doesn't count),--after someDate(process only resources modified afer a given date) and maybe--limit N(process only number of N resources) - You can choose the ARCHE instance by providing the
--repoUrl(the default is apollo, for minerva you should use--repoUrl https://arche-dev.acdh-dev.oeaw.ac.at/api) - You can also read data from an RDF file instead of an ARCHE repository using the
--inputFileparameter.
- You need a configuration file. You can use
Deployment
The script is deployed to run by cron on the ARCHE VM for ARCHE curation and production instances.