定制 funstaff/ref-lib-ris 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

funstaff/ref-lib-ris

Composer 安装命令:

composer require funstaff/ref-lib-ris

包简介

RIS is a format for reference metadata

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License SensioLabsInsight

This library provide a writer to RIS data format.

Installation

  1. Follow the instructions at http://packagist.org
  2. In your new project, create a composer.json file 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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固