[sword-devel] Sword Modules Access/Format
Ivo Benner
skython at web.de
Fri Dec 23 17:03:38 MST 2011
Hello,
I want to write a javascript based bible application that should be able
to download and use SWORD modules.
Its javascript because it should run as offline app on Linux, OSX,
Windows and even on all major mobile devices.
The Sword modules are binary files on a ftp server, so i've got some
issues so solve.
Binary file reading is possible with modern browsers and on mobile
devices with the FileReader API or AJAX with ArrayBuffers.
There are even libraries for zip and zlib compressions.
Since it's a Javascript application the best format would probably be
JSON and I already wrote a converter to convert bible modules to JSON,
but the files are quite huge.
My current problem with the binary format is that i cannot access the
files on http://crosswire.org with an AJAX request since there is an
"Origin Policy" which doesn't let other websites or local javascript
files fetch data from it.
So here are my questions:
Am I allowed to convert and host JSON converted Sword modules or are
there any licensing issues?
Can you allow AJAX cross origin requests for the sword files? For an
Apache webserver this would be:
Header set Access-Control-Allow-Origin "*"
within the directory rule. I'm accessing the files via HTTP:
http://www.crosswire.org/ftpmirror/pub/sword/raw/
Cross domain/origin FTP access is not possible with AJAX as far as i know.
If you can help me or if you have any questions concerning my
application please let me know.
Ivo
More information about the sword-devel
mailing list