dev-master
9999999-dev https://github.com/avvertix/converterA small library to convert different bibliography formats into each other
MIT
The Requires
- technosophos/libris dev-master
- php >=5.3.0
csl bibtex ris bibliography endnote
A small library to convert different bibliography formats into each other
Forked from https://github.com/geissler/converter, (*1)
A small library to convert the input data for different literature standards like BibTeX, CSL etc. into each other. At the moment are supported BibTeX, CSL and RIS., (*2)
Add to the composer.json
the require
key and run composer install., (*3)
"require" : { "avvertix/converter": "dev-master" }
Make sure you are using a PSR-2 compatible autoloader., (*4)
To convert form one standard to an other:, (*5)
// include the composer autoloader require __DIR__ . '/vendor/autoload.php'; use Geissler\Converter\Converter; use Geissler\Converter\Standard\RIS\RIS; use Geissler\Converter\Standard\BibTeX\BibTeX; use Geissler\Converter\Standard\CSL\CSL; $converter = new Converter(); // your input RIS data $data = 'TY - JOUR TI - Die Grundlage der allgemeinen Relativitätstheorie AU - Einstein, Albert PY - 1916 SP - 769 EP - 822 JO - Annalen der Physik VL - 49 ER - '; // convert to bibTeX $bibTeX = $converter->convert(new RIS($data), new BibTeX()); /** * $bibTeX has know the following value: * * @article{article, * author = {Einstein, Albert}, * year = {1916}, * pages = {769-822}, * title = {Die Grundlage der allgemeinen Relativitätstheorie}, * volume = {49} * } */ // or convert bibTeX to csl $csl = $converter->convert(new BibTeX($bibTeX), new CSL()); /** * $csl has know the following value (a UTF-8 encoded json string): * * [ * { * "type":"article", * "author":[{ * "family":"Einstein", * "given":"Albert" * }], * "issued":[{ * "year":"1916" * }], * "page":"769-822", * "page-first":"769", * "citation-label":"article", * "title":"Die Grundlage der allgemeinen Relativit\u00e4tstheorie" * } * ] */
To implement a new standard is quite simple:, (*6)
A small library to convert different bibliography formats into each other
MIT
csl bibtex ris bibliography endnote