Converting a Mozilla Address Book into Pine Format

Requires: a decent shell plus awk. Basically, you require some version of Unix running your computer. It has been tested under Linux (Suse 8.0) with GNU Awk 3.1.1.

How to convert your Mozilla address book:

  1. In Mozilla, open the address book and export it as a tab delimited file, let say "ab.txt".
  2. Run my script: "mozab2pine < mozab.txt > pineab.txt".
  3. Check the contents of pineab.txt, make manual changes as necessary.
  4. Concatenate pineab.txt with your pine .addressbook file, which should be located in your home directory.

How to obtain the conversion script:

  1. Make sure awk is present.
  2. Download mozab2pine and mozab2pine.awk for free.
  3. Do a chmod +x mozab2pine.

What is mozab2pine doing?

  1. It removes quotes and backslashes using the stream filter tr.
  2. It executes mozab2pine.awk
  3. It sorts the result (by last name).
  4. For more information, check the source.

What is mozab2pine.awk doing?

  1. It uses the fields first name, last name, display name and email of each record of the Mozilla exported addressbook.
  2. It rearranges them as TABlast name, firstnameTABdisplay name <email>.
  3. If fields are missing, it tries to reconstruct them from display name or email according to a simple heuristics.
  4. If email is missing, it ignores the record.
  5. For more information, check the source.

Good luck!

 


Valid HTML 4.01! Andreas Abel, http://www.tcs.informatik.uni-muenchen.de/~abel
Last modified: Sat Jan 31 23:19:45 CET 2004
Valid CSS!