PHPackages                             avvertix/converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. avvertix/converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

avvertix/converter
==================

A small library to convert different bibliography formats into each other

123PHP

Since Dec 17Pushed 10y ago2 watchersCompare

[ Source](https://github.com/avvertix/converter)[ Packagist](https://packagist.org/packages/avvertix/converter)[ RSS](/packages/avvertix-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Converter
---------

[](#converter)

Forked from

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](http://en.wikipedia.org/wiki/BibTeX "BibTeX"), [CSL](http://citationstyles.org/ "CSL") and [RIS](http://en.wikipedia.org/wiki/RIS_(file_format) "RIS").

Installation
------------

[](#installation)

### Via [composer](http://getcomposer.org/ "composer")

[](#via-composer)

Add to the `composer.json` the `require` key and run composer install.

```
    "require" : {
        "avvertix/converter": "dev-master"
    }

```

### Other

[](#other)

Make sure you are using a [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md "PSR-2")compatible autoloader.

Usage
-----

[](#usage)

To convert form one standard to an other:

```
    // 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"
      *     }
      * ]
      */
```

Adding a standard
-----------------

[](#adding-a-standard)

To implement a new standard is quite simple:

1. Create a copy of the folder **src/Geissler/Converter/Standard/Template**
2. Change the name to the new standard.
3. Rename also the **Template.php** file to the name of the standard
4. Replace every occurence of **Template** in the files **Creator.php**, **Parser.php** and **Template.php** with the name of the new standard.
5. Implement the methods **create** and **retrieve** in **Creator.php**
6. Implement the methods **parse** and **retrieve** in **Parser.php**
7. Don't forget to write your PHPUnit tests and follow the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md "PSR-2") coding standard

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d6c28ebb739784366f8f6751e40d630edef88d0ea094dcbc656351a1417c0a2?d=identicon)[avvertix](/maintainers/avvertix)

---

Top Contributors

[![avvertix](https://avatars.githubusercontent.com/u/5672748?v=4)](https://github.com/avvertix "avvertix (17 commits)")[![geissler](https://avatars.githubusercontent.com/u/535572?v=4)](https://github.com/geissler "geissler (10 commits)")[![BlueM](https://avatars.githubusercontent.com/u/1493457?v=4)](https://github.com/BlueM "BlueM (1 commits)")

### Embed Badge

![Health badge](/badges/avvertix-converter/health.svg)

```
[![Health](https://phpackages.com/badges/avvertix-converter/health.svg)](https://phpackages.com/packages/avvertix-converter)
```

###  Alternatives

[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k5.7M57](/packages/spatie-laravel-analytics)[spatie/period

Complex period comparisons

1.7k4.0M10](/packages/spatie-period)[contributte/di

Extra contrib to nette/di

465.8M18](/packages/contributte-di)[slince/composer-registry-manager

Composer mirrors manager

56314.9k](/packages/slince-composer-registry-manager)[hyva-themes/magento2-graphql-tokens

Adds Customer and Cart tokens to CustomerData sections

242.6M2](/packages/hyva-themes-magento2-graphql-tokens)[mkraemer/react-pcntl

PCNTL bindings for ReactPHP

57289.0k9](/packages/mkraemer-react-pcntl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
