liblouis / liblouis-java

Java bindings for liblouis
GNU Lesser General Public License v3.0
4 stars 9 forks source link

Include binaries and tables #12

Closed bertfrees closed 5 years ago

bertfrees commented 5 years ago

To make it make usable.

Currently you either have to have Liblouis installed on the system, or you have to load the library by pointing to a specific DLL/SO/DYLIB, and point to the tables by passing full file paths. Would be nicer if everything worked out of the box.

bertfrees commented 5 years ago

Also consider adding a compile method that accepts an InputStream instead of a file path or query. It should also be possible to set a TableResolver that returns a InputStream. If this is not possible to implement with the lou_compileString function I could still create temporary files.

bertfrees commented 5 years ago

Also add a binding for lou_getTableInfo and make it return a data structure that contains all metadata (locale, grade, display-name, etc.). With this we can then add an API call for getting the metadata of all tables, which the caller can then filter.

bertfrees commented 5 years ago

By the way Joel tried embedding the binaries and it is apparently super easy. Ask him how he did it.

bertfrees commented 5 years ago

Consider adding a cache of extracted table files that works across multiple runs of the program. See Joel's code for how he did it. I think it would be nicer if I could find a way to not use the user's home directory for it.

bertfrees commented 5 years ago

@joeha480 I have implemented this. Let me know if you have tested it, then I'll make a release.