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:
(c) 2003, by Eric Lavarde (linux =at= zorglub.s.bawue.de)
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
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
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 (@@@).