LibRIS: An RIS parser for PHP
- Author: Matt Butcher email@example.com, 2010-02-06
- License: An MIT-like license (COPYING-MIT.txt)
This library provides basic marshaling and unmarshaling support for the RIS format.
RIS is used to encode metadata about references. The normative reference for the format can be found here:
General usage for this class is simple:
- The LibRIS class is used to parse RIS.
- The RISWriter class is used for writing RIS data into a string.
Here's an example (from test/simple_test.php):
<?php require_once '../src/LibRIS.php';
$ris = new LibRIS(); $ris->parseFile('./test1.ris');
$records = $ris->getRecords();
$rw = new RISWriter(); print $rw->writeRecords($records); ?>
- Include the library
- Create a new LibRIS reader
- Parse a file
- Pretty-print the parsed records
- Create a new writer
- Turn our parsed record back into a valid RIS record.
The format of the records is documented in
The Phing Script
This file includes a Phing build.xml script. However, it is rarely used.