Download the PHP package lakshay/converter without Composer
On this page you can find all versions of the php package lakshay/converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lakshay/converter
More information about lakshay/converter
Files in lakshay/converter
Package converter
Short Description A small library to convert different bibliography formats into each other
License MIT
Homepage https://github.com/lakshayverma/converter
Informations about the package converter
Converter
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.
Installation
Via composer
Add to the composer.json
the require
key and run composer install.
Other
Make sure you are using a PSR-2 compatible autoloader.
Usage
To convert form one standard to an other:
Limitations
The built-in BibTeX converter has the following limitations:
- Non-UTF-8 strings are converted to UTF-8
- LaTeX escape sequences are converted to UTF-8 characters
- Enclosing braces are discarded. (Neither CSL nor RIS support explicit capitalisation.)
Adding a standard
To implement a new standard is quite simple:
- Create a copy of the folder src/Lakshay/Converter/Standard/Template
- Change the name to the new standard.
- Rename also the Template.php file to the name of the standard
- Replace every occurence of Template in the files Creator.php, Parser.php and Template.php with the name of the new standard.
- Implement the methods create and retrieve in Creator.php
- Implement the methods parse and retrieve in Parser.php
- Don't forget to write your PHPUnit tests and follow the PSR-2 coding standard
Tests
Converter depends on PHPUnit. Ensure that your dependencies are up to date by running composer update
then call vendor\bin\phpunit tests
to run all the tests.