Neil, I will admit I don't know much about windows and COM (mainly due to my main operating system being Linux). Do you or someone else know whether dbus (linux) is a similar idea to COM? If they are similar then I might gain more interest in a COM/dbus interface.
Now moving on to a more general discussion of how applications can use translators. I was thinking a little along a DLL like (I say DLL like as I probably would write it in python and so it would be a python module) which could use plugins (each plugin would be for a translator). The plugin could tell the main module what translators it has (I am meaning translator in a different way here and could really do with another word, this use is to mean a specific translator of one format to another format, eg. xhtml to nemeth or docbook to BAUK Braille). At the risk of comparing it to something which may be more complicated than I imagine this to be, I think gstreamer works in a similar way to what I am thinking (gstreamer deals with processing multimedia, what we need is something to process documents).
Michael Whapples On 09/11/09 05:39, Neil Soiffer wrote:
I have a COM wrapper to liblious (and UMCL) that has gone stale. I keep meaning to update it to the current build, but never get around to it. I'd like to update it and get it into the sources so anyone can use it.There are essentially two parts to the interface: discovery and usage. Discovery means finding the COM components that support the interface and what info they provide and usage is actually calling for the translation. The advantage of using COM versus compiling in a version of liblious is that the application (in my case, MathPlayer) can evolve separate from LibLious and people can independently update. Using a DLL does that also, but COM means that others can implement the interface (as UMCL did), so you have a wider range of choices -- every product is bound to have their own set of "quirks"/bugs. The downside to COM is that although it is a cross platform solution, it is really only used on Windows. If you are providing a windows solution, it is a great way to go.I can't remember how we solved the names that we present to users, but I don't think it was a good solution (I think only Nemeth existed we we wrote it). Definitely, it would be much better to have some meta info at the top of the file that could be read without reading the entire file. A commenting convention as Michael proposes would be OK -- just try to keep it simple.NeilOn Sun, Nov 8, 2009 at 3:47 AM, Michael Whapples <mwhapples@xxxxxxx <mailto:mwhapples@xxxxxxx>> wrote:I have a few thoughts, possibly influenced from some of the python stuff.: * Could we have description as another option? I don't know how liblouisxml reads the configuration files but in python if using the ConfigParser module then a programme would not be affected by extra options not originally thought about, it would just ignore the extra options (if liblouisxml works this way then it would be able to accept a description option as it stands). * May be a comment done in a certain way at the beginning of the file then only the start of the file needs to be read. I would imagine you may want something to determine that it is actually a description comment so that for files with no description then the app won't show the sort of comments existing at the top of the configuration files which do not help understand what that file is for. I will admit I haven't looked back at the discussion about liblouis tables, I do intend to. I am thinking as an example the comment for a description may start #* instead of just #. Michael Whapples On 08/11/09 03:48, John J. Boyer wrote: Selecting configuration files is similar to the problem of selecting liblouis tables that Christikn discussed a couple of days ago. The files could begin with a descriptive comment and the application could just display these in a radio-button list. We'll be working on tables and can consider configuration files also. John On Sat, Nov 07, 2009 at 10:51:46PM +0000, Michael Whapples wrote: Thanks will look at that. As for selecting the configuration files, couple of questions: * Is there any way for a programme to find out the lbx_files directory? * While the three cfg files have reasonably easy to understand file names at the moment, I was just wondering whether there was a way to get a more readable configuration name or may be even a description? I do doubt this as the contents of the file don't hold this information. Its just I would have liked it that a application could present to the user a list like: "UK maths Braille output with capitals for A4 paper" "UK maths Braille output without capitals for A4 paper" "Nemeth Braille output for A4 paper" ... I know that the above may not represent the current options with liblouisxml but as people develop more configurations, tables, etc such a list could start forming and filenames may not be enough to keep it easy for the user. Michael Whapples On 07/11/09 21:39, John J. Boyer wrote: Liblouisxml will handle bare equations in MathML. This is already done by an application from ViewPlus. Use the function lbx_translateString which is described in the documentation. The configuration file specifies which braille math code to use. The lbx_files directory contains various configuration files, such as nemeth.cfg ukmaths.cfg marburg.cfg I think all the user would have to do is pick the math code. John On Sat, Nov 07, 2009 at 07:17:35PM +0000, Michael Whapples wrote: Hello, I know that liblouisxml can handle MathML but I would like to know a little about what it can do. I am looking into using liblouisxml possibly to add some sort of math Braille access in screen readers (either NVDA or orca, to be decided as I don't know how well they can communicate with firefox). If I hand liblouisxml (from a programme) some MathML, but it is only the equation will liblouisxml be able to handle this? I have noticed that when sending a full document to liblouisxml it lays it out as if it will be embossed, my use is for a Braille display, will it do this for the example of just sending an equation? Some separate stuff: How can I get my programme to know what the various configurations will do so it could present the user with a list of options, or will I have to manually map these to easy to understand names? I am sure I have some other comments on liblouisxml and mathml, but those are slightly different and so I will deal with them in another message. Michael Whapples For a description of the software and to download it go to http://www.jjb-software.com For a description of the software and to download it go to http://www.jjb-software.com For a description of the software and to download it go to http://www.jjb-software.com