[sword-devel] Where is the source code for individual SWORD modules?

Aaron Rainbolt arraybolt3 at gmail.com
Sat Oct 21 01:48:55 EDT 2023


On Sat, Oct 21, 2023 at 12:20 AM Greg Hellings <greg.hellings at gmail.com> 
wrote:
>
> In general the imported file will not be available since it is not the source of those modules. Other than for the KJV itself, Crosswire is not the authoritative source of the texts. Often any OSIS file is a product of a conversation from the original source. If anything has been kept it should be a script to produce that OSIS file so that, if the source material is updated, the module can be automatically created from it. Very old modules which have not been updated in a decade+ might not have any reproducible material floating around at all if they predate that process.

Well, right, I get that, but when the text I want to get at is in the 
form of a SWORD module, I don't need the authoritative source, I just 
need something I can parse and turn into what I want. Which it turns out 
mod2imp will give me, so I guess I don't need the OSIS / TEI / ThML 
sources after all. I just expected that Crosswire probably had them 
somewhere since https://wiki.crosswire.org/DevTools:Modules mentioned 
that Crosswire only accepted module source code when submitting a 
module, not a pre-built module.
>
> The KJV(A) module pair are the exception to this and should be located on the server somewhere.
>
> As for generating LaTeX, I thought the engine could already do that? I thought Peter had added a filter for that back when he was doing some work with the texts. You should be able to iterate module and generate the text from there, if a render filter exists for LaTeX. If not, now would be a great time for you to learn the filter API (it is akin to an XML SAX style of interface) and write one!

mod2imp claims to be able to generate LaTeX (something like `mod2imp -r 
LATEX AKJV`) but at least the Ubuntu build of libsword-utils mod2imp is 
broken in this regard - any time I try to use any of the filters, it 
tells me "mod2imp: Unknown argument: LATEX" or something similar for 
every single possible output format (OSIS, XHTML, RTF, etc.). I should 
try to build SWORD from source and see if that behaves any better.

I don't know what XML SAX even is but it sounds difficult and scary :P 
Might be fun to look into if I get the time though.

Thanks for your help!

Aaron

> --Greg
>
> On Fri, Oct 20, 2023, 23:28 Aaron Rainbolt <arraybolt3 at gmail.com> wrote:
>>
>> Gah, I am forgetful. I can just use mod2imp to get parsable text. It's
>> not exactly what I was looking for but it'll work good enough :D
>>
>> On 10/20/23 23:15, Aaron Rainbolt wrote:
>> > I don't know if I'm just blind or if these aren't public, but I cannot
>> > find the OSIS (or whatever format) code for individual SWORD modules
>> > in the Crosswire repository. Specifically I'm trying to find the
>> > source for the AKJV module. I'd like to take the code and parse it
>> > myself for a project of my own (I'm trying to typeset the AKJV
>> > translation using LaTeX, and may want to do the same sort of thing
>> > with other modules). As it is, I'm having to open the modules in
>> > Xiphos, and then copy and paste their text one chapter at a time into
>> > my formatting tools, which is... cumbersome. If I could get the source
>> > code for the modules, I could just write a parser that would do the
>> > whole job for me in one go.
>> >
>> > Are the OSIS sources kept private intentionally? If not, where would I
>> > find them to download them?
>> >
>> > (Note that I understand why some modules' source code might be
>> > private, for things like the NASB module. But it would be nice if the
>> > code for public domain or otherwise permissively licensed modules were
>> > available for public download.)
>> >
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page


More information about the sword-devel mailing list