Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

The PBN Utilities

Content

Goals License Installation

Goals
The PBN verifier checks if the input file obeys PBN 1.0 standard and PBN 2.0 standard (These links are local copies. The originals can be obtained from PBN Homepage). The verifier (pbn_verify.exe) is based on the original verifier, which was written by Tis Veugen in Java. The program is written entirely in C++, hence, it is considerably faster than its predecessor. Although PBN format contains text data, it is not readable by humans (for example, have a look at this file. pbn2txt solves this problem, namely, it converts pbn files to text files that are much easier to read (same file converted using pbn2txt). Similarly, pbn2html converts pbn files to html. To allow more flexibility, pbn2html uses an intermediate output format. For the intermediate files I choose m4 macro files. I was introduced to use of m4 macro files for bridge diagram typesetting when I visited Jeff Coldsmith's web site. I found the technology quite powerful and I have been using it since. To generate the final html files, the following are needed: the m4 macro files, the m4 file containing the macros and result file (the file that contains the information shown after each deal). More specifically, to generate q1.html from q1.pbn we should:

Generate the m4 files using pbn2html (pbn2html.exe -t -s q1.res q1.pbn > q1.thtml). Combine the body of the m4 file (generated during the previous step with) with the header and footer part of the html (cat header.html q1.thtml footer.html > q1.html.m4). Run the m4 utility to create the final html (m4 q1.html.m4 > q1.html). The expansion of the m4 macros is defined by a file called "bridgemacros.m4" which should reside in the current directory. I provide the one I used to generate the html files on this web site.

Finally I was able (typical time constraints:-) to add "export" support to the PBN Library. To illustrate this feature I included a small utility called pbn_fix_names, which imports a pbn file, converts the name using PBN standard convention, and finally exports the file.

License
All the utilities are available under the GPL license.

Installation
To install the program, you should:

Download pbn_utilities.zip. Unzip the archive in a directory. You should be able to see the following files in the directory. o pbn_verify.exe

o o o

pbn2txt.exe pbn_fix_names.exe pbn2html directory which contains pbn2html.exe and example files

All the programs are console executable. In other words you should start them from a command prompt window. Start a command prompt window, go to the directory where you unzipped the files and run the program.

You might also like