<div dir="ltr">I&#39;m working on a Python module for representing osisIDs (works, passages, IDs, and refs). I think I&#39;ve got the OsisWork class baked pretty well (at least for reading/parsing), and I would appreciate your thoughts: <a href="http://github.com/openscriptures/api/blob/master/osis.py#L122">http://github.com/openscriptures/api/blob/master/osis.py#L122</a><br>
<br>It supports osisID works like those listed here (you can run these tests via `python osis.py`): <a href="http://github.com/openscriptures/api/blob/master/osis.py#L474">http://github.com/openscriptures/api/blob/master/osis.py#L474</a><br>
<ul><li>Bible</li><li>KJV</li><li>Bible.en</li><li>Bible.en.KJV</li><li>Bible.en.KJV.1611</li><li>Bible.en.ChurchOfEngland.KJV.1611</li><li>KJV.1611.06.07</li><li>KJV.1611.06.07.235930</li></ul>In the last two examples, the month and day are also provided (if they aren&#39;t, then they default to 1); and in the very last example, the time is also included (HHMMSS).<br>
<br>An OsisWork then has the following members:<br><ul><li>segments (each of the period-delimited segments in the osisID)<br></li><li>type (one of the strings enumerated in TYPES)<br></li><li>publisher (a string, the first of two segment slugs listed in the osisID)<br>
</li><li>name (a string, the single slug listed or the second of two)<br></li><li>pub_date (a datetime object; is “pub_date” the best name?)<br></li></ul>Are there other pieces of information that should be parsed out? What about revision, version, or edition like:<br>
<ul><li>Bible.Example.2010.r231239921</li><li>Bible.Example.2010.v2</li><li>Bible.Example.2010.ed3</li></ul>Currently if anything is included which isn&#39;t recognized, then it will raise an exception; instead it should probably glob the unrecognized segments into a &quot;etc&quot; or &quot;splat&quot; list.<br>
<br>Thoughts? I&#39;d love to get this implementation fully built out to be a reference implementation for ports into PHP, JavaScript, etc.<br><br>Weston<br><br><br><div class="gmail_quote">On Tue, May 4, 2010 at 12:52 AM, Weston Ruter <span dir="ltr">&lt;<a href="mailto:westonruter@gmail.com">westonruter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Hello all,<br>Things have been a bit quiet on my end the past few weeks, so I wanted to update you on where I am at and what I see as coming next for the API development.<br>
<br>I&#39;ve been working on a standalone Python module for representing and working with OsisWork, OsisPassage, OsisID, and OsisRef objects. Since OSIS identifiers form such an integral part of the URI space for the RESTful API as it is currently designed, having a solid OSIS library seemed like a good thing to work on. You can see what I have so far here: <a href="http://github.com/openscriptures/api/blob/master/osis.py" target="_blank">http://github.com/openscriptures/api/blob/master/osis.py</a> (it&#39;s not yet at an alpha state). Please let me know what you think and fork the code to make corrections and improvements.<br>

<br>Once osis.py is baked, then the Django views can be written to handle the various OSIS objects. I hope that the osis.py module could also be ported over to JavaScript and PHP and other primary languages to give us a familiar interface for working with OSIS identifiers.<br>

<br>In other news, my wife and I are expecting the birth of our first child, a son, in three weeks. I plan to keep involved here as much as possible, but will probably be distracted (though hopefully not as much as I have been these past few weeks).<br>

<br>Weston<br></div>
</blockquote></div><br></div>