Introduction and Presentation

The script jp2moz (jpilot to mozilla) creates out of a CSV file exported by Jpilot 0.99.5, a CSV file readable by Mozilla. Two things need to be considered for this purpose:

Well, nevertheless, here is how the stuff works:

  1. Create a CSV file from JPilot called jpilot.csv

  2. Call 'jp2moz' in the directory where you created the file.

  3. A new file 'mozPalmPilot.csv' is created in the same directory.

  4. You can then import this last file using the 'Tools --> Import... --> Address Book' function from Mozilla (tested with 1.2.1 and 1.3.1). You might need to reshuffle the fields if you didn't keep the default order.

 (c) 2003, by Eric Lavarde (linux =at=

Annex, some useful knowledge

jpilot fields (in order)

Category Private Last First Title Company Phone1 Phone2 Phone3 Phone4 Phone5 Address City State ZipCode Country Custom1 Custom2 Custom3 Custom4 Note phoneLabel1 phoneLabel2 phoneLabel3 phoneLabel4 phoneLabel5 showPhone

jpilot Phone Number meaning

  1. Work Phone

  2. Home Phone

  3. Fax

  4. Other Phone

  5. Email

  6. Company Standard Phone

  7. Pager (? Funkruf in German)

  8. Mobile

mozilla fields (in default order)

First Last Display Nickname Email AdditionalEmail WorkPhone HomePhone Fax Pager Mobile HomeAddress1 HomeAddress2 HomeCity HomeState HomeZip HomeCountry WorkAddress1 WorkAddress2 WorkCity WorkState WorkZip WorkCountry WorkTitle WorkDepartment WorkOrganization WorkWebPage HomeWebPage BirthYear BirthMonth BirthDay Custom1 Custom2 Custom3 Custom4 Notes

Annex, source code comments

The files used for conversion are defined in the variable '$jpfile' and '$mozfile' and can be, of course modified by the user.

The main (and quite easy loop) of the program: take each line of the jpfile in an array, transform it for Mozilla using the function 'jp2moz' and write it to the Mozilla csv file.

The function 'jp2moz' is the main and unique function of the program. Input parameter is an array reference. Output parameter is as well an array reference.

The idea is: $mozcols = jp2moz($jpcols);

As many of the decisions taken in the function are discutable, the user should feel free to modify it as he likes it. I tried to mark the most interesting parts to modify with 3 arobases (@@@).