[jsword-devel] Cannot Download files from Xiphos Repo Using JSword

Martin Denham mjdenham at gmail.com
Fri Mar 11 13:57:25 MST 2011


I thought I would do a follow up on this.

*Status*
As most of you will already know Sword doesn't use the zips, it uses the
files directly, and that is why Sword can use Xiphos repo without error.
Also, my previous post did not prompt any changes that might allow JSword to
access the Xiphos repo zip files - which is a shame.

At the moment I am implementing Gen Books and wanted to include some of the
Gen Books from Xiphos into the list of available books for users to read
because the Xiphos repo has a nice selection which incidentally includes one
of my recent favourites "The Life and Times of Jesus Christ the Messiah" by
Alfred Edersheim.

*My Attempts*
Well here is how I got on in my attempts.  I managed to download from Xiphos
repo a couple of ways:
1. hack JSword HttpSwordInstaller to force lowercase file name if the repo
being used is Xiphos
2. feed in a conf file with a lower case name/initials
3. use lowercase name if download fails

Methods 1 & 2 seem to work and the first was more seamless from a user's
perspective but the second allowed me to contain the code in And Bible and
avoid another JSword tweak.  The only problem with the second is that a
module's initials are displayed as lowercase until the app is restarted.  If
the user tried to download an index AB wouldn't be able to finf it but
GenBooks don't have indexes at the moment so the problem is avoided.  I
can't think of any other issues and I think I could probably force the
initials to be correct if I needed to.
Method 3 is a variation on method 1 that would continue to work if the names
were ever altered to mixed case.  So in theory it looks good but seems
untidy so I didn't try it.

*Problem Zips in Xiphos*
There are some books like Baxter, SacredMeditations and Shaw that I managed
to download but not expand.  However, I have put enough effort in this area
for now so I just won't show those books in the download list.

If in the future somebody plans to change the case of the file names in the
Xiphos repo I will need some warning!

Regards
Martin

On 14 February 2011 20:52, Martin Denham <mjdenham at gmail.com> wrote:

> I tried downloading from Xiphos tonight but as DM feared there were
> filename case issues because JSword looks for a mixed case name based on the
> first [*name*] line in the .conf file and all the files on ftp.xiphos.orgare lower case.
>
> Here is the problem, using Gill as an example.
>
> JSword reads the module's initials from the first [Gill] line in gill.conf
> Module initials: Gill
>
> Xiphos has filename gill.zip
> Zip file: http://ftp.xiphos.org/sword/zip/gill.zip
>
> JSword HttpSwordInstaller tries to load
> http://ftp.xiphos.org/sword/zip/Gill.zip and throws an error because there
> is no Gill .zip, only a gill.zip.
>
> It would be good to know what Sword does because clearly Sword can read all
> the repositories.
>
> For info the settings I am using in InstallManager.plugin are:
> Installer.4=sword-http,Xiphos,ftp.xiphos.org,/sword/zip,/sword,,,
>
> Regards
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110311/ebc10539/attachment.html>


More information about the jsword-devel mailing list