Hi,<br><br><div class="gmail_quote">On Tue, Jan 15, 2013 at 1:41 PM, Chris Little <span dir="ltr"><<a href="mailto:chrislit@crosswire.org" target="_blank">chrislit@crosswire.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 1/14/2013 12:38 PM, webmedic wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all<br>
<br>
I know it's been a long time since I posted anything. The last I was<br>
looking at module creation I read a bunch of documentation on osis gbf<br>
and vpl. I was rather confused by it all.<br>
</blockquote>
<br></div>
GBF is definitely not supported. Use OSIS.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have since created quite a few modules for the word as I understand<br>
SQL and rtf markup is pretty simple.<br>
<br>
How easy or hard would it be to convert these to osis or gbf? I don't<br>
think I have seen a simple relation type chart or something that says<br>
this HTML tag equals this osis tag or this gbf tag.<br>
</blockquote>
<br></div>
RTF and HTML are presentational markup languages. OSIS and TEI are primarily semantic markup languages, though they allow presentational markup to some degree.<br>
<br>
So producing good OSIS isn't as simple as identifying that RTF {\i1 ...} is HTML <i>...</i> is OSIS <hi type="italic">...</hi>. Better OSIS will come from determining what you mean by italics and encoding that rather than the italic-ness of the text. So, for example, do italics mark foreign text, emphasis, or titles? Using <hi> for presentational markup is, of course, possible, albeit discouraged.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also in python is there anything for writing sword modules.<br>
</blockquote>
<br></div>
There should be. Others can comment on the Python bindings. I know that they exist, but haven't tried to use them.<br></blockquote><div><br>It is certainly possible to create modules from the Python bindings.<br>BPBible has a wrapper around the functionality which may or may not be a good source of ideas. You can see it at <a href="http://code.google.com/p/bpbible/source/browse/trunk/backend/create_module.py">http://code.google.com/p/bpbible/source/browse/trunk/backend/create_module.py</a>. It can both create a module and create its conf file.<br>
<br>To write it from scratch, the core calls there would be something like:<br><div style="margin-left:40px"><br># Create the SWModule instance.<br>module = SWRawVerse.createModule(path)<br><br># Set a value for a key (repeat for all keys you want to set).<br>
module.setKey(SWVerseKey("Genesis 1:1"))<br>module.setEntry("Contents of Genesis 1:1")<br></div><br>You would then need to set up a conf file, point it to the right directory and so forth.<br>There's a lot more boilerplate in the file I linked to (some of which I don't understand what it does) but the basics should be just "create a module of the write type, and then set values for each key in turn".<br>
<br>Jon<br></div></div>