acdh-oeaw/arche-ref-sources
Composer 安装命令:
composer require acdh-oeaw/arche-ref-sources
包简介
Library for fetching data from external reference sources
README 文档
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
Instructions for repo-ingestion@hephaistos.arz.oeaw.ac.at
The script is already installed on repo-ingestion@hephaistos.arz.oeaw.ac.at
- ssh to repo-ingestion@hephaistos
- run
./login.sh - run
/ARCHE/vendor/bin/arche-ref-sources {parameters} {pathToConfigFile}and replace the part in{}with your choice of parameters- Example 1: fetch data without changing what is there for resources modified after 01.12.2021, output on console what has been fetched and also write this output to a file:
/ARCHE/vendor/bin/arche-ref-sources --mode parse --verbose --output /ARCHE/staging/enrichment/outputEnrich.ttl --after 2021-12-01 /ARCHE/vendor/acdh-oeaw/arche-ref-sources/config-sample.yaml
- Example 2, not for the faint of heart: fetch data and change on instance, but immediately revert changes; also output on console what has been fetched and write this output to a file as well:
/ARCHE/vendor/bin/arche-ref-sources --mode test --verbose --output /ARCHE/staging/enrichment/outputEnrich.ttl /ARCHE/vendor/acdh-oeaw/arche-ref-sources/config-sample.yaml
- If you want to use your own config file, make a copy of /ARCHE/vendor/acdh-oeaw/arche-ref-sources/config-sample.yaml (
cp /ARCHE/vendor/acdh-oeaw/arche-ref-sources/config-sample.yaml {placeOfYourChoice) and edit it.
- Example 1: fetch data without changing what is there for resources modified after 01.12.2021, output on console what has been fetched and also write this output to a file:
acdh-oeaw/arche-ref-sources 适用场景与选型建议
acdh-oeaw/arche-ref-sources 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.95k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 12 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 acdh-oeaw/arche-ref-sources 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 acdh-oeaw/arche-ref-sources 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-13