[sword-devel] HTML5 File API and SWORD modules

Chris Burrell chris at burrell.me.uk
Tue May 7 08:02:20 MST 2013

Not sure if it helps, but STEP has a rather large amount of JavaScript but
relies on a Java web server to retrieve the data. Our desktop version will
simply run a very lightweight servlet container (Jetty).


On 7 May 2013 15:58, Stephan <info at tetzels.de> wrote:

> Sorry for reopen this thread...
> After reading sword module files with server-side Javascript (
> https://github.com/zefanja/**node-swordjs<https://github.com/zefanja/node-swordjs>)
> I was able to read the ztext modules in the browser. I've used the FileAPI
> to read a *.bzz file (or better only a part of it) and decompress the
> ArrayBuffer/Uint8Array with zlib.js (https://github.com/imaya/**zlib.js<https://github.com/imaya/zlib.js>)
> to get uncompressed data.
> I don't like the idea of rewriting everything from scratch, but currently
> there is no way to use the c++ code for a javascript implentation. I've
> tried to port the SWFilter part with Emscripten but without success. I
> think it is possible to port the simple filters that only have a
> processText() function, but the OSIS filters have to many dependencies
> (like SWModule, SWMgr, VerseKey, ...).
> Another problem is (like mentioned before) how to store the module files
> in a browser. There is the FileSystem API, but it is Chrome-only. IndexedDB
> is implemented in Firefox, Chrome and IE10, but you can store file blobs
> only in Firefox and not in the other browsers. There is a FileSystem API
> wrapper for Firefox (https://github.com/ebidel/**idb.filesystem.js<https://github.com/ebidel/idb.filesystem.js>)
> but with some limitations.
> What do you think about a HTML5/JS implemantion in general? How can we use
> as much as possible code of the current library so that we don't have to
> rewrite everything from scratch?
> I will uploaded my code as soon as I cleaned it up.
> --Stephan
> ______________________________**_________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/**mailman/listinfo/sword-devel<http://www.crosswire.org/mailman/listinfo/sword-devel>
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130507/4e0024c2/attachment-0001.html>

More information about the sword-devel mailing list