-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the rsword wiki!
You need to download the sword project http://www.crosswire.org/sword/software/index.jsp (I have currently only tested it on Linux). Once it is installed you should be able to do a gem install rsword . It will need libclucene, libz, libcurl. Let me know if you have trouble installing it, maybe I can add more library search paths. I also recommend you have at least one sword module installed (like the KJV module, instructions on sword website but I can help if needed).
Example usage in irb 1.9.3
require 'rsword'
mgr=Sword::SWMgr.new
mod=mgr.getModule('KJV')
mod.getRawEntry #should print the content of Genesis 1:1, including markup
mod.increment
mod.getRawEntry #Genesis 1:2
k=Sword::VerseKey.new('John 1:2')
mod.setKey(k)
mod.getRawEntryThe functionality of the Sword:: module maps on the the C++ Sword api, I am noticing some possible problems in the search functionality right now which I'll try to address (try mod.doSearch('jesus') and let me know how it works for you) thankfully though, if you search for Jesus you will find Him.
you should be able to go into one of the rsword_gem directories (depending if you are using the release or svn versions of rsword), and either execute the extconf.rb there directly to build the .so, or pack up the gem and install.
The SWIG interface files are there mostly as reference, they are virtually uncopied from an earlier SVN release, there are changes in the latest sword SVN that help with compatibility.
WIP
Let me know any thoughts, God bless