https://github.com/funstaff/reflibris
This library provide a writer to RIS data format
https://github.com/funstaff/reflibris
php7 ris writer
Last synced: 7 months ago
JSON representation
This library provide a writer to RIS data format
- Host: GitHub
- URL: https://github.com/funstaff/reflibris
- Owner: Funstaff
- License: mit
- Created: 2017-01-04T12:37:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T12:17:26.000Z (over 7 years ago)
- Last Synced: 2025-03-25T05:43:39.785Z (over 1 year ago)
- Topics: php7, ris, writer
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
RefLibRis
===
[](https://travis-ci.org/Funstaff/RefLibRis)
[](https://scrutinizer-ci.com/g/Funstaff/RefLibRis/?branch=master)
[](https://scrutinizer-ci.com/g/Funstaff/RefLibRis/?branch=master)
[](https://packagist.org/packages/funstaff/ref-lib-ris)
[](https://packagist.org/packages/funstaff/ref-lib-ris)
[](https://insight.sensiolabs.com/projects/0ae60c3a-8405-4e4f-baae-f5d697e367a9)
* Author: Bertrand Zuchuat
* License: MIT
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:
```javascript
{
"require": {
"funstaff/ref-lib-ris": ">=2.0"
}
}
```
## Use
```php
[
'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:
```ex
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](http://github.com/funstaff/RefLibRis/issues).