These bindings allow you to use Liblouis from within Lua.
The bindings are compiled against any lua (between 5.1 and 5.4) that is found on your system.
Currently they are highly experimental, pull requests are welcome.
Requirements
liblouis :: needs to be installed. The bindings adapt to the size of ~widechar~.
lua :: needs to be installed. Any version between 5.1 and 5.4 will do.
luarocks :: to build and install the bindings
Install
luarocks install lua-louis
Usage
local louis = require "liblua-louis"
print(louis.translateString("de-g2.ctb", "Guten Tag"))
** Fennel You can even invoke liblouis from [[https://fennel-lang.org/][the fennel language]], as it compiles to lua:
(let [louis (require :liblua-louis)] (print (louis.translateString "en-ueb-g2.ctb" "Hello World")) (print (louis.version)))
Building
luarocks make rockspecs/lua-louis-0.4-1.rockspec
Todo See [[https://github.com/liblouis/lua-louis/issues][the issue list]]. Mostly the bindings should be more complete and idiomatic. Pull request are certainly very welcome.
License The bindings are released under [[https://www.gnu.org/licenses/lgpl-3.0.en.html][LGPLv3+]].