--------------------------------------------------------------------------------
           SMARTPBK (c) 2003 Marc BERLIOUX <lxdevs@berlioux.com>
--------------------------------------------------------------------------------

      This tool's aim is to process an HP 95LX phonebook file (.PBK) 
       and to create text-based outputs using template files

--------------------------------------------------------------------------------
                                  Why ?
--------------------------------------------------------------------------------
The 95LX built-in phone book stores for each record 3 fields:
- the "Name" field (30 chars)
- the "Number" field (30 chars)
- the "Address" field (312 chars)
3 fields were not enough for me so i decided to enhance the capabilities 
of the 95LX phone book with a home-made soft i called "smartpbk" 
in order to extract more fields from an ordinary pbk file.
--------------------------------------------------------------------------------
                           Features of smartpbk
--------------------------------------------------------------------------------
if invoqued as : smartpbk myphonebook.pbk :
- performs a text dump of the phone book file

if invoqued as : smartpbk myphonebook.pbk templatefile.tpl :
- extracts the family_name from the name_string if it's written in uppercase 
  and other names up to five names (including the family_name).
- extracts phone numbers up to five numbers from the phone_string 
- extracts fax, mobile, job, aka, pgp, day, comments,
  3 emails, web URL, address, post code, city from the address_string 
  if they are written in a specific way

- once it has got all these informations it produces an output file
  according to the template file.
--------------------------------------------------------------------------------
                              example
--------------------------------------------------------------------------------
if you have a record in your phone book looking like this :

Name: John Fitzgerald KENNEDY
Number: 0123456789 0123456000
Address:
fax:11111111 mob:22222222
job:33333333 pgp:44444444
aka:JFK day:11/22/1963
jfk@white-house.us www.white-house.us
somewhere in
10000 WASHINGTON

and if the template file contains :
<pbk-body>
my first name is:
<pbk-n1>

my family name is:
<pbk-fn>

my phone is:
<pbk-p1>

my email is:
<pbk-mail>

my city is:
<pbk-city>

</pbk-body>

then it will produce:
my first name is:John
my family name is:KENNEDY
my phone is:0123456789
my email is:jfk@white-house.us
my city is:WASHINGTON

--------------------------------------------------------------------------------
                      writing your own template file :
--------------------------------------------------------------------------------
any line outside header, body, or footer
will be ignored
<pbk-header>
insert here what to be displayed
 once before the records
</pbk-header>
<pbk-body>
text
<pbk-...>
text
<pbk-...>
etc...
<pbk-pause> : insert this tag to stop between each record 
              (useful for debugging your phone book..) 
	      press <enter> to skip to the next
</pbk-body>
<pbk-footer>
insert here what to be displayed
once after the records
</pbk-footer> end of footer

all available tags <pbk-...> are detailed in the doc/tags.txt file
tags MUST be alone on their line.
each line must have 80 chars max.
any empty line will produce a line feed.
--------------------------------------------------------------------------------
                               quick start :
--------------------------------------------------------------------------------
there are a few sample template files in the 'tpl' directory
and a sample phone book file in the pbk directory
just try this :
smartpbk sample.pbk test.tpl
or this :
smartpbk sample.pbk tstcolor.tpl (Linux or maybe DOS with ANSI.SYS)
--------------------------------------------------------------------------------
                 Marc BERLIOUX <lxdevs@berlioux.com>
--------------------------------------------------------------------------------
