Permalink
Browse files

Initial add of library.

  • Loading branch information...
0 parents commit a0472efd109c4a19c0de3a2a511dc13cf48b1628 M Butcher committed Feb 6, 2010
Showing with 922 additions and 0 deletions.
  1. +21 −0 COPYING-MIT.txt
  2. +52 −0 README.mdown
  3. +335 −0 build.xml
  4. +109 −0 doc/RecordFormat.mdown
  5. +357 −0 src/LibRIS.php
  6. +13 −0 test/short.ris
  7. +12 −0 test/simple_test.php
  8. +23 −0 test/test1.ris
@@ -0,0 +1,21 @@
+LibRIS
+Matt Butcher <matt@aleph-null.tv>
+Copyright (C) 2010 Matt Butcher
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,52 @@
+# LibRIS: An RIS parser for PHP
+
+* Author: Matt Butcher <matt@aleph-null.tv>, 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:
+
+http://www.refman.com/support/risformat_intro.asp
+
+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');
+
+ $ris->printRecords();
+
+ $records = $ris->getRecords();
+
+ $rw = new RISWriter();
+ print $rw->writeRecords($records);
+ ?>
+
+Line-by-line:
+
+ 1.
+ 2. Include the library
+ 3.
+ 4. Create a new LibRIS reader
+ 5. Parse a file
+ 6.
+ 7. Pretty-print the parsed records
+ 8.
+ 9. Create a new writer
+ 10. Turn our parsed record back into a valid RIS record.
+
+The format of the records is documented in `doc/RecordFormat.mdown`.
+
+## The Phing Script
+
+This file includes a Phing build.xml script. However, it is rarely used.
Oops, something went wrong.

0 comments on commit a0472ef

Please sign in to comment.