[liblouis-liblouisxml] Re: How to get liblouisutdml to find liblouis tables on windows

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 5 Aug 2013 06:24:54 -0500

Well, we do need a tutorial. Contributions in pklain text would be 
welcome. They can be put in texinfo format. Send them to the list as 
attachments, so everyone can benefit and contribute.

John

On Mon, Aug 05, 2013 at 11:27:58AM +0100, Michael Whapples wrote:
> I don't know texinfo. I could provide some wording in plain text though.
> 
> However, as in another message, I said that it is important that the 
> documentation matches the implementation so that one does not try what 
> the documentation says and then finds it does not work. I do not feel 
> knowledgable enough about the implementation to be able to write 
> anything accurate enough. I would only be writing my experience, so you 
> could easily find comments of "Liblouisutdml is very picky about the 
> directory structure", etc. I probably would be more writing a tutorial 
> rather than a reference manual.
> 
> Michael Whapples
> On 05/08/2013 11:04, John J. Boyer wrote:
> >Michael,
> >
> >You are correct about the directory structure. Since liblouis is a
> >dependency of liblouisutdml the latter uses many of the functions of
> >the former, including lou_setDataPath, lou_logPrint, etc. In Linux and
> >Mac the path to the tables is /xxx/share/loblouis/tables . The liblouis
> >subdirectory also contains a doc subdirectory. This directory structure
> >is retained in Windows, but the doc Subdirectory is not, because
> >documentation is handledd in another way.
> >
> >The documentation for liblouisutdml could certainly be improved. I've
> >been concentrating on finding bugs in the code, especially the utdml
> >portion. Any help with the documentation would be appreciated.
> >
> >John
> >
> >On Mon, Aug 05, 2013 at 10:44:11AM +0100, Michael Whapples wrote:
> >>OK, I think I have this problem solved: It appears the lou_setDataPath
> >>should be set to a path where there is a liblouis and liblouis\tables
> >>subdirectories.
> >>
> >>Also by setting that it seems like liblouisutdml will use
> >>lou_getDataPath to look for a liblouisutdml and liblouisutdml\lbu_files
> >>subdirectories.
> >>
> >>This seemed unintuitive, as lou_setDataPath is a liblouis call I
> >>expected it to impact only on liblouis and thus that the directory set
> >>in that would be the actual tables directory (IE. so one is not set to
> >>this directory structure, which seems a bit excessive, why I need a
> >>directory which only contains one subdirectory and no files I do not
> >>know, I would like a flatter directory structure unless there is a good
> >>reason for these extra subdirectory levels).
> >>
> >>Liblouisutdml documentation makes no reference to using lou_setDataPath,
> >>as liblouisutdml was the package I am primarily using that is my primary
> >>reference for information, it is no wonder I was lacking in so much
> >>information.
> >>
> >>Again, sorry for the negative and short tone, but I hope you will
> >>understand this is due to such an awful experience trying to use
> >>liblouisutdml and documentation just not giving sufficient information
> >>to make things work and thus many wasted hours. As I said, the only
> >>reason I have persisted with this is due to doing these python bindings
> >>for work and so being told which translation library would be used. If I
> >>had a free hand on which translation library to use, I would have
> >>probably given up on liblouisutdml and look else where well before this
> >>was solved.
> >>
> >>Please take my comments constructively so the documentation can be
> >>improved so that nobody faces this sort of trouble even doing the basics
> >>with liblouisutdml.
> >>
> >>Michael Whapples
> >>On 04/08/2013 13:50, Michael Whapples wrote:
> >>>That just muddies the water even more, they seem to say something else
> >>>(from what I can comprehend, although BBIni.java is poor documentation
> >>>at the best of times due to the code style and it is a separate
> >>>project anyway, shouldn't liblouisutdml be standalone?).
> >>>
> >>>The liblouisutdml documentation and C header file suggests that the
> >>>arguments for lbu_initialize are configFileList (a list of
> >>>configuration files, or if started with comma a settings string), a
> >>>log file name and a settings tring. This was what I had been working
> >>>to up to now, passing in relevant strings for that set of arguments.
> >>>
> >>>The liblouisutdml Java bindings suggests it takes a data path, a
> >>>writable path, and a log file name. I tried passing in strings
> >>>relevant to this, but this also fails, claiming the log file cannot be
> >>>opened, not finding liblouisutdml.ini, etc. This seems very wrong for
> >>>the C API.
> >>>
> >>>So does the Java API have a different set of functions to the C API
> >>>(at least different set of functions in the sense they behave
> >>>differently)?
> >>>
> >>>If so then BrailleBlaster code is irrelevant to me.
> >>>
> >>>Any working C examples for Windows?
> >>>
> >>>Michael Whapples
> >>>On 04/08/2013 04:04, John J. Boyer wrote:
> >>>>Try looking at BBIni.java in BrailleBlaster and the Java bindings.
> >>>>
> >>>>When you get the Python bindings working, we can consider adding them to
> >>>>the liblouisutdml repository.
> >>>>
> >>>>John
> >>>>
> >>>>On Sun, Aug 04, 2013 at 01:30:45AM +0100, Michael Whapples wrote:
> >>>>>Thanks for mentioning about the lou_setDataPath function, I did hope
> >>>>>that would fix it.
> >>>>>
> >>>>>No such luck, still have the problem.
> >>>>>
> >>>>>So even when I call lou_setDataPath before calling lbu_initialize I
> >>>>>still get these errors of the tables not being found. When I call
> >>>>>lou_getDataPath I do get the path I set returned.
> >>>>>
> >>>>>I was not sure whether I should have the trailing backslash or not, I
> >>>>>tried both and neither worked.
> >>>>>
> >>>>>Looking at the BrailleBlaster directory structure I deduced the
> >>>>>following layout:
> >>>>>
> >>>>>myproject\
> >>>>>   liblouisutdml\
> >>>>>     __init__.py # My python bindings
> >>>>>     liblouis\
> >>>>>       tables\
> >>>>>     liblouisutdml\
> >>>>>       lbu_files\
> >>>>>     liblouis.dll
> >>>>>     liblouisutdml.dll
> >>>>>
> >>>>>The files liblouis.dll and liblouisutdml.dll are both ones built using
> >>>>>the windows directories of the source distributions (as if I were
> >>>>>building for BrailleBlaster).
> >>>>>
> >>>>>I have also tried the following layouts as well:
> >>>>>myproject\
> >>>>>   liblouisutdml\
> >>>>>     lbu_files\
> >>>>>     tables\
> >>>>>     __init__.py
> >>>>>     liblouis.dll
> >>>>>     liblouisutdml.dll
> >>>>>
> >>>>>And
> >>>>>myproject\
> >>>>>   liblouis\
> >>>>>     tables\
> >>>>>   liblouisutdml\
> >>>>>     lbu_files\
> >>>>>     __init__.py
> >>>>>     liblouis.dll
> >>>>>     liblouisutdml.dll
> >>>>>
> >>>>>And
> >>>>>myproject\
> >>>>>   lbu_files\
> >>>>>   tables\
> >>>>>   liblouisutdml\
> >>>>>     __init__.py
> >>>>>     liblouis.dll
> >>>>>     liblouisutdml.dll
> >>>>>
> >>>>>In all cases I had the current working directory as myproject.
> >>>>>
> >>>>>These look about all possible sensible options for directory layout,
> >>>>>but
> >>>>>none work, even when using lou_setDataPath.
> >>>>>
> >>>>>I must also note, it is only the liblouis tables not being found,
> >>>>>brf.cfg refers to preferences.cfg and that is found. It is files like
> >>>>>nemeth.ctb, etc which are not found.
> >>>>>
> >>>>>I just cannot tell what else can be done.
> >>>>>
> >>>>>Michael Whapples
> >>>>>On 04/08/2013 00:09, John J. Boyer wrote:
> >>>>>>Look at how BrailleBlaster is set up. The tables and liblouisutdml
> >>>>>>files
> >>>>>>are in subdirectories of programData and the function lou_setDataP;ath
> >>>>>>is used to point to it. I assume you are using the dlls generated
> >>>>>>by the
> >>>>>>files in the windows directories of both liblouis and loiblouisutdml.
> >>>>>>YuMei ahould know about this.
> >>>>>>
> >>>>>>John
> >>>>>>
> >>>>>>On Sat, Aug 03, 2013 at 08:59:55PM
> >>>>>>+0100, Michael Whapples wrote:
> >>>>>>>Hello,
> >>>>>>>How does one get liblouisutdml to find the liblouis tables on
> >>>>>>>windows?
> >>>>>>>In short it just does not seem to work and the documentation seems to
> >>>>>>>say nothing useful.
> >>>>>>>
> >>>>>>>The longer description of what I am doing: I am trying to write some
> >>>>>>>python bindings for liblouisutdml. When I call either
> >>>>>>>lbu_initialize or
> >>>>>>>lbu_translateString (these are the only function calls I have got
> >>>>>>>round
> >>>>>>>to trying at the moment, not to say others do not work either), I
> >>>>>>>just
> >>>>>>>get errors about liblouis tables not being found. I have tried
> >>>>>>>passing
> >>>>>>>in a relative path (eg. liblouisutdml\lbu_files\brf.cfg) or an
> >>>>>>>absolute
> >>>>>>>path, but in either case I just get these errors. If I just pass
> >>>>>>>in the
> >>>>>>>name of the configuration file (eg. brf.cfg ), then I get errors
> >>>>>>>about
> >>>>>>>the configuration file cannot be found.
> >>>>>>>
> >>>>>>>I am only passing in a single configuration file name.
> >>>>>>>
> >>>>>>>So referring to the documentation, I gather that the paths for
> >>>>>>>liblouis
> >>>>>>>tables are relative to the DLL, however the documentation fails to
> >>>>>>>say
> >>>>>>>what this relative path is, so I have to guess. I have tried
> >>>>>>>placing the
> >>>>>>>tables directory next to the dll, in the working directory, make the
> >>>>>>>tables directory a subdirectory of a liblouis directory (again tried
> >>>>>>>placing it in both the directory next to the liblouis.dll and in the
> >>>>>>>working directory), tried placing the tables in the same directory as
> >>>>>>>the liblouisutdml configuration files, and probably a few other
> >>>>>>>things
> >>>>>>>which are escaping me (I tried so many things its hard to remember
> >>>>>>>everything tried). In all cases I still get the errors about the
> >>>>>>>liblouis tables not being found.
> >>>>>>>
> >>>>>>>I have no clue where liblouis is looking for the tables, the error
> >>>>>>>messages do not help as they do not say the complete path.
> >>>>>>>
> >>>>>>>Sorry if I have a short tone in this, but its very annoying that this
> >>>>>>>just seems to not work regardless of what I try and its hardly a
> >>>>>>>ground
> >>>>>>>breaking thing I am trying to do. If the documentation was clearer
> >>>>>>>then
> >>>>>>>I probably would not have wasted as much time on this as I have and
> >>>>>>>probably would have something working, and so would not be so
> >>>>>>>annoyed.
> >>>>>>>The only reason I am persisting with this is that I am writing
> >>>>>>>this for
> >>>>>>>someone else, and so do not get to choose the Braille translation
> >>>>>>>library.
> >>>>>>>
> >>>>>>>Michael Whapples
> >>>>>>>For a description of the software, to download it and links to
> >>>>>>>project pages go to http://www.abilitiessoft.com
> >>>>>For a description of the software, to download it and links to
> >>>>>project pages go to http://www.abilitiessoft.com
> >>For a description of the software, to download it and links to
> >>project pages go to http://www.abilitiessoft.com
> 
> For a description of the software, to download it and links to
> project pages go to http://www.abilitiessoft.com

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: