I guess I overlook something really basic as I am just beginner at programming.
The thing is that I am trying to integrate liblouis to my Javascript project:
I created node-js project testing-liblouis.
I start with npm i liblouis.
This install liblouis and it's dependency liblouis-build with translation tables.
When I try basic example that is in ReadMe:
const liblouis = require("liblouis");
console.log("Liblouis Version using Easy API:", liblouis.version());
liblouis.setLogLevel(liblouis.LOG.ALL);
var unicode_braille = liblouis.translateString(
"tables/unicode.dis,tables/de-de-g0.utb",
"10 Ziegen"
);
console.log("Unicode Braille:", unicode_braille);
console.log(unicode_braille);
It returns:
Liblouis Version using Easy API: 3.2.0
[ALL] Performing translation: tableList=tables/unicode.dis,tables/de-de-g0.utb, inlen=20
[ALL] Inbuf=0x0031 0x0030 0x0020 0x005A 0x0069 0x0065 0x0067 0x0065 0x006E 0x0000 0x001B 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 ~ 10 Ziegen
[ERROR] Cannot resolve table 'tables/unicode.dis'
[ERROR] 1 errors found.
[ERROR] tables/unicode.dis,tables/de-de-g0.utb could not be found
Unicode Braille: null
null
I tried to set also path to tables:
const tableFolderPath =
"C:/Users/MyUser/testing-liblouis/node_modules/liblouis-build/";
liblouis.enableOnDemandTableLoading(tableFolderPath);
The output remains the same.
Is there something that needs to be adjusted or configured to make it work?
Hi guys,
I guess I overlook something really basic as I am just beginner at programming. The thing is that I am trying to integrate liblouis to my Javascript project:
I created node-js project testing-liblouis. I start with npm i liblouis.
This install liblouis and it's dependency liblouis-build with translation tables.
When I try basic example that is in ReadMe:
const liblouis = require("liblouis"); console.log("Liblouis Version using Easy API:", liblouis.version()); liblouis.setLogLevel(liblouis.LOG.ALL); var unicode_braille = liblouis.translateString( "tables/unicode.dis,tables/de-de-g0.utb", "10 Ziegen" ); console.log("Unicode Braille:", unicode_braille); console.log(unicode_braille);
It returns:
Liblouis Version using Easy API: 3.2.0 [ALL] Performing translation: tableList=tables/unicode.dis,tables/de-de-g0.utb, inlen=20 [ALL] Inbuf=0x0031 0x0030 0x0020 0x005A 0x0069 0x0065 0x0067 0x0065 0x006E 0x0000 0x001B 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 ~ 10 Ziegen [ERROR] Cannot resolve table 'tables/unicode.dis' [ERROR] 1 errors found. [ERROR] tables/unicode.dis,tables/de-de-g0.utb could not be found Unicode Braille: null null
I tried to set also path to tables: const tableFolderPath = "C:/Users/MyUser/testing-liblouis/node_modules/liblouis-build/"; liblouis.enableOnDemandTableLoading(tableFolderPath);
The output remains the same.
Is there something that needs to be adjusted or configured to make it work?
Thanks a lot.
Jan