/lua-louis

Experimental lua bindings for liblouis

Primary LanguageM4GNU Lesser General Public License v3.0LGPL-3.0

Experimental Lua bindings for liblouis

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 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 the issue list. Mostly the bindings should be more complete and idiomatic. Pull request are certainly very welcome.

License

The bindings are released under LGPLv3+.