funstaff/ref-lib-ris
Composer 安装命令:
composer require funstaff/ref-lib-ris
包简介
RIS is a format for reference metadata
README 文档
README
- Author: Bertrand Zuchuat bertrand.zuchuat@gmail.com
- License: MIT
This library provide a writer to RIS data format.
Installation
- Follow the instructions at http://packagist.org
- In your new project, create a
composer.jsonfile which requires RefLibRis:
{ "require": { "funstaff/ref-lib-ris": ">=2.0" } }
Use
<?php namespace ...; use Funstaff\RefLibRis\RecordProcessing; use Funstaff\RefLibRis\RisDefinition; use Funstaff\RefLibRis\RisMappings; use Funstaff\RefLibRis\RisWriter; $mapping = [ 'DEFAULT' => [ 'TY' => ['type'], 'AU' => ['author'], 'TI' => ['title', 'title_secondary'], ], 'BOOK' => [ 'TY' => ['type'], 'AU' => ['author'], 'TI' => ['title', 'title_secondary'], 'ID' => ['recordid'] ] ]; $recordDb = [ 'title' => ['History of the CDC PY - 1999'], 'author' => ['Behrens, J.', 'Behrens, A.'], 'type' => ['BOOK'] ]; $risMappings = new RisMappings($mapping, 'DEFAULT'); $recordProcessing = new RecordProcessing($risMappings); $record = $recordProcessing->process($recordDb); $writer = new RisWriter(new RisDefinition()); $output = $writer->addRecord($record)->process();
Output:
TY - BOOK AU - Behrens, J. AU - Behrens, A. TI - History of the CDC PY - 1999 ER -
Found a bug
If you found a bug, please let me know. The best way is to file a report at http://github.com/funstaff/RefLibRis/issues.
统计信息
- 总下载量: 4.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-05