[jsword-devel] Introductions and some newb questions

DM Smith dmsmith555 at yahoo.com
Fri Feb 1 16:25:12 MST 2008


Mike Bradley wrote:
> Hi,
> My name is Mike Bradley, and I've been considering writing an open 
> source Biblical library management system.
>   

Welcome! This is sounds great!

> I'd link you to a website for more information, but I haven't put one up 
> yet.  Hopefully, if all goes well, someday it will be a competition of 
> sorts to programs such as yours, eSword, PCStudyBible, Logos, etc.  I 
> say "competition of sorts" as I want to focus more on the library 
> management side of things and a little less on the Bible study side of 
> things, something I haven't seen done yet.  As an example of the 
> difference, most of these programs are mostly about the Bible, whereas I 
> plan for my program to be primarily about texts that aren't Bibles (nor 
> lexicons, dictionaries, or concordances).
>
> As a good programmer, I've been scouring the net looking for libraries 
> and such that I can use from other people so that I don't have to write 
> all the code myself.  So, I've happened upon jSword and I am very 
> intrigued.  I believe jSword might be very usable for me in my project, 
> so that I can focus more on the features I want to add and less on the 
> book implementation.  I may need to modify some stuff as I will probably 
> need a richer set of "keys" for non verse-based and non-index based 
> texts.  But I'll have to dig into the code and figure out what's there 
> first.
>   

Within the last month I have posted some tutorials and found others in 
the jsword-devel archive. I'd suggest reading those.

I think the JSword architecture will work well for you.

Regarding keys, we do have a robust notion of keys, but there is more 
work that can be done regarding ranges (e.g. Chapter 1 to Chapter 3, 
paragraph 4).

> My first newb question is, how do I add books?  I ask this because the 
> APIExamples.java primer assumes that the KJV is installed and it isn't.
> Never mind, I found my answer.  I'll post it in case anyone else is 
> looking for help on this issue.
>   
JSword will look in many places for modules and you can set a Java 
variable to look in others. If a book is present in one of these 
locations, then it should load up quite easily.

JSword has an install manager that if you ask it to get a Book from a 
location it will download it to it's download area. There are no 
examples of how to do this in APIExamples. I'll see about putting one 
together. And reply back to this email.

> Download the following: 
> http://www.crosswire.org/ftpmirror/pub/sword/packages/raw/KJV.zip
> Extract the zip file to a location that I'll refer to as [PATH]
> Add the following code into the main() method of APIExamples.java (add 
> it before the readPlainText() is called) and import what is necessary to 
> compile the new types.
>   

For JSword, this is a bit too manual. It should use the code to do the 
download.

> <Code>
>
>         try
>         {
>             File file = new File("[PATH]/mods.d/kjv.conf");
>             URI bookRootPath = new URI("[PATH]");           
>
>             SwordBookMetaData sbmd = new SwordBookMetaData(file, 
> BIBLE_NAME, bookRootPath);
>             SwordBookDriver.registerNewBook(sbmd);
>         }
>         catch (Exception e)
>         {
>             e.printStackTrace();
>         }
>
> </Code>
>
> Is this something that you want me to check-in, or is that not helpful?
>   
The examples are meant to work at a higher level. I think that this is a 
little bit too low level.

Let me see what I can come up with as an example.

> The example still doesn't fully work as the next methods 
> (readStyledText(), readDictionary(), search(), etc) throw exceptions.  
> I'll get to work fixing these, but maybe someone else out there who 
> knows the code base should do it.
>   

I haven't run the examples lately, but they should work without exceptions.

> That's it for now.  If there is anyone out there who would like to talk 
> more about what I'm doing or what you're doing, write me at MrQBerrt 
> <AT> gmail <DOT> com
>
> May the Lord make His face shine upon you,
> -Mike
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>   




More information about the jsword-devel mailing list