Convert Windows Address Book (WAB) files to read on Linux

I found this solution by Patrick Boettcher <pboettch@github> titled “libwab – a tool to read Windows Address Book files from the command line” in https://github.com/pboettch/libwab

You should have a GNU C language environment ready. So install:

 $ sudo apt install build-essential

Very easy to use. Just download libwab-master.zip and extract its content to a project directory.

$ mkdir ~/Documents/cpp/libawb
$ cd  ~/Documents/cpp/libawb
$ unzip -j libwab-master.zip
Archive: libwab-master.zip
16e5b8a4917f1f273926e93b6aadb17695127ef5
inflating: CMakeLists.txt 
inflating: COPYING 
inflating: ChangeLog 
extracting: INSTALL 
inflating: README 
inflating: THANKS 
inflating: cencode.c 
inflating: cencode.h 
inflating: libwab.c 
inflating: libwab.h 
inflating: pstwabids.c 
inflating: pstwabids.h 
inflating: tools.c 
inflating: tools.h 
inflating: uerr.c 
inflating: uerr.h 
inflating: wabread.c

If you do not have cmake installed, then install it.

$ sudo apt install cmake
[sudo] password for user: 
Reading package lists... Done
Building dependency tree 
...
After this operation, 24.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
$

We need to run cmake to configure the development environment to the one we have installed in our machine.

So we run:

~/Documents/cpp/libwab$ cmake .
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Documents/cpp/libwab
~/Documents/cpp/libwab$

The messages may vary in your environment.

Now we are ready to make our application:

~/Documents/cpp/libwab$ make
Scanning dependencies of target wabread
[ 14%] Building C object CMakeFiles/wabread.dir/cencode.c.o
[ 28%] Building C object CMakeFiles/wabread.dir/libwab.c.o
[ 42%] Building C object CMakeFiles/wabread.dir/pstwabids.c.o
[ 57%] Building C object CMakeFiles/wabread.dir/tools.c.o
[ 71%] Building C object CMakeFiles/wabread.dir/uerr.c.o
[ 85%] Building C object CMakeFiles/wabread.dir/wabread.c.o
[100%] Linking C executable wabread
[100%] Built target wabread
~/Documents/cpp/libwab$

The program was made in our project directory. We can put our .WAB file there, and execute the program. If my .WAb file is my_file.wab then we run:

~/Documents/cpp/libwab$ ./wabread my_file.wab > my_file.ldif

It will convert the .WAB file to an ldif file. This a simple text format easy to read and parse for any other purpose.

There is an heuristic mode (-h) where wabread will try to read erased records.

Regards.