mvnForum Homepage

Print at Apr 16, 2014 12:19:09 AM View all posts in this thread on one page
Posted by danielbair at Oct 24, 2008 7:40:25 AM
Creating a General Book Module
I have converted a MSReader eBook .lit file to OEBPS using clit. From this I now have a very nice HTML file of this eBook.

I have been searching and searching for the past three days and I can not find any info on how to convert my HTML file to a SWORD General Book module.

I have tried to convert my HTML file to XML with tidy -asxml but xml2gbs still fails.

I don't know what other SWORD utilities or non SWORD utilities will do the trick.

Is there anyone who would give me instructions with examples of what I need to do?

Thanks,

Daniel

Posted by mdbergmann at Oct 24, 2008 8:55:29 AM
Re: Creating a General Book Module
Daniel.

Here is some more information on how to create SWORD modules:
http://www.crosswire.org/wiki/index.php/DevTools:Modules

The XML has to be OSIS formated I think.


Regards,
Manfred

Posted by danielbair at Oct 24, 2008 9:53:13 AM
Re: Creating a General Book Module
Daniel.

Here is some more information on how to create SWORD modules:
http://www.crosswire.org/wiki/index.php/DevTools:Modules

The XML has to be OSIS formated I think.


Regards,
Manfred


Thanks, I have already read that document. It doesn't contain anything for converting HTML into a SWORD module. (or any other helpful intermediate steps)

I did find tools for converting to/from ThML and now I have a ThML file, but xml2gbs still fails to work. It just creates zero sized files, and the module in BibleTime is empty.

I'm beginning to think that the problem lies in xml2gbs, and thml2gbs doesn't exist anymore.

-Daniel

Posted by mdbergmann at Oct 24, 2008 11:48:25 AM
Re: Creating a General Book Module
Sorry, can't help you here.

I'm struggling myself with creating a bible genbook.


Maybe someone else can jump in?



Manfred

Posted by Osk at Oct 24, 2008 5:27:16 PM
Re: Creating a General Book Module
Regarding thml2gbs vs. xml2gbs, the former is just the old version of the latter. When we began moving to OSIS, we generalized thml2gbs to accept either ThML or OSIS input and renamed it xml2gbs.

Presuming you have a valid ThML file, xml2gbs should work for you. There are too many variables for me to guess why you would be having a problem (e.g. incorrect permissions, .conf file errors, unvalidated ThML, or even simply unanticipated ThML structures).

Posted by mdbergmann at Oct 27, 2008 9:29:43 AM
Re: Creating a General Book Module
Osk, I have a OSIS source here that creates a successfully a bible module using osis2mod.
Can I keep the OSIS tags (<div type='book' osisID='Gen' canonical='true'>, <chapter>, <verse>) for creating a genbook?

I tried it using xml2gbs and something was created but the MacSword and BibleDesktop code can't load the module.


Regards,
Manfred

Posted by danielbair at Oct 27, 2008 11:14:10 AM
smile   Re: Creating a General Book Module
Regarding thml2gbs vs. xml2gbs, the former is just the old version of the latter. When we began moving to OSIS, we generalized thml2gbs to accept either ThML or OSIS input and renamed it xml2gbs.

Presuming you have a valid ThML file, xml2gbs should work for you. There are too many variables for me to guess why you would be having a problem (e.g. incorrect permissions, .conf file errors, unvalidated ThML, or even simply unanticipated ThML structures).


I found the problem. The xml2gbs was expecting divn (div1, div2, div3, etc.) and my document didn't have any of those. The htm2thm script didn't create any divn so I hacked it to just add a div1 around the body text.

Hurray, I now have all my personal genbooks installed like I wanted.

-Daniel