bclibraries/fulltext-finder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bclibraries/fulltext-finder

Composer 安装命令:

composer require bclibraries/fulltext-finder

包简介

Finds links to fulltexts from citations

README 文档

README

FulltextFinder is a PHP library for finding links to fulltext versions of articles from user input.

Installation

Use the package manager composer to install FulltextFinder.

composer init # Only necessary when starting a project from scratch.
composer require bclibraries/fulltext-finder:^0.1

FulltextFinder is currently a 0.* release, so things will change drastically with any minor release.

Usage

use BCLib\FulltextFinder\Config;
use BCLib\FulltextFinder\FullTextFinder;

require_once __DIR__ . '/vendor/autoload.php';

# LibKey API identifiers.
$libkey_apikey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
$libkey_id = 'xxx';

$config = new Config();
$config->setUserAgent('MyApp/1.1 (https://mylibrary.college.edu/search; mailto:myapp.admin@cikkege.edu)')
    ->setFindByCitationMinLength(50);

$finder = FullTextFinder::build($libkey_id, $libkey_apikey, $config);
$response = $finder->find('Ben-Harush, A., Ezra-Shiovitz, S., Doron, I., Alon, S., Leibovitz, A., et al. (2017). Ageism among physicians, nurses, and social workers: findings from a qualitative study. European Journal of Ageing, 14(1), 39-48.');

echo "{$response->getTitle()}\n";
echo "\t{$response->getFullText()}\n";

Configuration

The BCLib\FulltextFinder\Config object carries all optional FullTextFinder configuration parameters:

Parameter Description Default
UserAgent The User-Agent header sent to the Crossref API. For User-Agent requirements, see the Crossref API docs. If the User-Agent is not set appropriately or is set to null, Crossref requests will be made in the public API pool. null
FindByCitationMinLength The minimum length of a search string in characters before find-by-citation will be applied. Searches under this length will look for a DOI in the string but will not query Crossref if a DOI is not found. 20

Running tests

PHPUnit is used for testing. You may need to enable the sockets extension.

./vendor/bin/phpunit 

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

  • 总下载量: 167
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固