xml2brl

The command-line (or console) program is xml2brl. The line to type is:

xml2brl  [-l] [-f config-file] [infile] [outfile]

The brackets indicate that something is optional. You will see that nothing is required except the program name itself, xml2brl. The various optional parts control how the program will behave, as follows:

[-l] This option will cause xml2brl and liblouisxml to print error messages to xml2brl.log instead of stderr. The file will be on the path determined by the configuration file. This option is particularly useful if xml2brl is called by a GUI script.

[-f configfile] This specifies the configuration file which tells xml2brl how to do the transcription. This file specifies such things as the number of cells per line, the number of lines per page, The translation tables to be used, how paragraphs and headings are to be formatted, etc. If this part of the command line is ommitted, xml2brl assumes that the configuration file is named default.cfg. The configuration files are stored in the lbx_files directory

[infile] This is the name of the input file containing the material to be transcribed. The file may be either an xml file or a text file. Typical xml files are those provided by www.bookshare.org or those derived from a word processor by saving in xml format. If a text file is used paragraphs and headings should be separated by blank lines. In such a file there is no way to distinguish between paragraphs and eeadings, so they will all be formatted as paragraphs, as specified by the configuration file. However, if you want a blank line in the braille transcription use two consecutive blank lines in the text file.

xml2brl is set up so that it can be used in a ``pipe". if infile is simply a minus sign (-) input is taken from the standard input unit.

outfile is the name of the output file. If it is omitted output goes to the standard output unit, from where it can be piped to another program, such as a driver for a braille embosser.

If only the program name is typed xml2brl assumes that the configuration file is default.cfg, input is from the standard input unit, and output is to the standard output unit. The ability of xml2brl to be used in a pipe is utilized in the ``helper'' programs discussed next.

Greg Kearney 2007-05-30