[liblouis-liblouisxml] Re: Specifying files in liblouisutdml configuration files

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 10 Jul 2014 14:09:39 -0500

I think users have been using arbitrry directories on Linux. That has 
never been tested on Windows. Can you test on Linux?

John

On Thu, Jul 10, 2014 at 06:35:20PM +0100, Michael Whapples wrote:
> Hello,
> Well then it seems like this isn't working properly on Windows, I
> had the following set up:
> c:\liblouisutdml-bin\
>   conf\
>     nimas.cfg
>     nimas.sem
>     compress.cti
>     en-us-g2.ctb
>     en-us-g1.ctb
>     ... all other dependent files for nimas.cfg
> 
> Then when I called translateFile through the Java bindings with
> configList set to c:\liblouisutdml-bin\conf\nimas.cfg I got an error
> informing me that compress.cti could not be found.
> 
> I only got the one error from liblouisutdml, so if it tries to
> resolve all files (IE. does not stop at the first error), then there
> is something unusual going on for compress.cti. If it does stop at
> the first file resolution error then it really is not working.
> 
> Are you sure on Linux it is not falling back to the installed
> directory configuration and tables locations? Have you tried using
> it outside the current directory (eg. as I am with a subdirectory)?
> 
> Michael Whapples
> On 10/07/2014 18:10, John J. Boyer wrote:
> >The files are assumed to be in the directory given in the path, not a
> >subdirectory. So ./conf will be the directory searched. this is done so
> >that the user can set up a directory containing special tables or files.
> >
> >John
> >
> >On Thu, Jul 10, 2014 at 06:03:15PM +0100, Michael Whapples wrote:
> >>To clarify the path being specified take the following example. If I
> >>give as the config list the path ./conf/nimas.cfg then will liblouis
> >>look for tables in ./conf/ or ./conf/liblouis/tables and will
> >>liblouisutdml look for semantic action files in ./conf or
> >>./conf/liblouisutdml/lbu_files?
> >>
> >>If I call setDataPath then it is the latter (IE.
> >>./conf/liblouis/tables and ./conf/liblouisutdml/lbu_files).
> >>
> >>Michael Whapples
> >>On 10/07/2014 17:56, John J. Boyer wrote:
> >>>I'm pretty sure that on Linux if the original configuration fille has a
> >>>path that path is included in the search for tables, semantic-action
> >>>files and other configuration files. Of course the liblouis tables and
> >>>liblouisutdml lbu_files directories are also searched.
> >>>
> >>>John
> >>>
> >>>On Thu, Jul 10, 2014 at 03:14:03PM +0100, Michael Whapples wrote:
> >>>>On 10/07/2014 15:08, John J. Boyer wrote:
> >>>>>If you   give the original configuration file a path liblouisutdml and
> >>>>>liblouis will look for files in that path as well as the default path.
> >>>>MW: It does not seem to be working for me at least on Windows (Linux
> >>>>not tested for this). When you say the table is searched for on the
> >>>>path one gives when specifying the configuration file, do you mean
> >>>>actually located in the same directory next to the configuration
> >>>>file or do you mean it still uses the liblouis/tables and
> >>>>liblouisutdml/lbu_files directory trees?
> >>>>>I think a little code will be needed to make path specifications
> >>>>>platform-independent. There is a variable called ud->file_sep that
> >>>>>contains the separator character for the platform. The module paths.c is
> >>>>>the place to start.
> >>>>>John
> >>>>>
> >>>>>On Thu, Jul 10, 2014 at 01:51:53PM +0100, Michael Whapples wrote:
> >>>>>>Hello,
> >>>>>>In a liblouisutdml configuration file, when specifying another file
> >>>>>>(eg. translation table or semantic action file) how does one specify
> >>>>>>where that file will be found in a platform independent way?
> >>>>>>
> >>>>>>If you give just the file name with no path component (eg.
> >>>>>>en-us-g2.ctb) then it appears liblouisutdml looks in the default
> >>>>>>data path.
> >>>>>>
> >>>>>>If giving a path component then you have the platform specific path
> >>>>>>separators.
> >>>>>>
> >>>>>>So my original question of how to give it in a platform independent 
> >>>>>>manner?
> >>>>>>
> >>>>>>Also how can I specify the file will be found in the same directory
> >>>>>>as the configuration file I am referencing it from?
> >>>>>>
> >>>>>>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: