PHPackages                             geissler/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. geissler/converter

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

geissler/converter
==================

A small library to convert different bibliography formats into each other

1110913[2 issues](https://github.com/geissler/converter/issues)[2 PRs](https://github.com/geissler/converter/pulls)PHP

Since Aug 20Pushed 3y ago3 watchersCompare

[ Source](https://github.com/geissler/converter)[ Packagist](https://packagist.org/packages/geissler/converter)[ RSS](/packages/geissler-converter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Converter
---------

[](#converter)

[![Build Status](https://camo.githubusercontent.com/f831397a2b214f0d2be78176d93af3afcb628fb31e383c2a86d8fe27c87d5736/68747470733a2f2f7472617669732d63692e6f72672f67656973736c65722f636f6e7665727465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/geissler/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](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" : {
        "geissler/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

25

—

LowBetter than 35% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.6% 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/ec28c899a8473452780b021dcc40acc79435ed1c16e49810e16aa719bd708f88?d=identicon)[geissler](/maintainers/geissler)

---

Top Contributors

[![geissler](https://avatars.githubusercontent.com/u/535572?v=4)](https://github.com/geissler "geissler (12 commits)")[![burki](https://avatars.githubusercontent.com/u/464455?v=4)](https://github.com/burki "burki (3 commits)")[![BlueM](https://avatars.githubusercontent.com/u/1493457?v=4)](https://github.com/BlueM "BlueM (1 commits)")[![daviian](https://avatars.githubusercontent.com/u/5477981?v=4)](https://github.com/daviian "daviian (1 commits)")

### Embed Badge

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

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

###  Alternatives

[tedivm/jshrink

Javascript Minifier built in PHP

76239.0M172](/packages/tedivm-jshrink)

PHPackages © 2026

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