| Migrating Palm Address Books to Linux iPAQs | |
|---|---|
| Description: This tutorial describes an automated method for exporting all your Palm Pilot contact info to your Linux iPAQ's gpe-contacts database. | |
|
|
| Moving PalmOS Contact Info to GPE-Contacts | |
When moving from a system running Palm OS to a GPE install of familiar Linux on a HP/Compaq iPAQ, it's nice to have a way in which to migrate all that wonderful information that has been accumulating on your Clie (or other Palm device). Here we'll detail the process for migrating the addressbook/contact information stored in the Palm. RequirementsThese instructions assume you are working on a Linux or other Unix desktop and have a GPE installation on top of Familiar Linux, running on your iPAQ. It may be possible to perform the migration to an OPIE installation or from another operating system, the important thing is that your Palm desktop organizer allow you to export your addressbook as vCard data (and you may need to be able to run Perl on your desktop as well). In these cases, filling in the blanks is left as an exercise for the reader. To perform this migration, you will need:
Exporting the Data
Select all the addresses you wish to export, select the vCard format, enter a name for the new file, then "OK". The file should now exist and be filled with a series of vCard entries such as: BEGIN:VCARD VERSION:3.0 PRODID:-//Judd Montgomery//NONSGML J-Pilot 0.99.8-pre8//EN UID:palm-addressbook-00cc7029-00002b8a-Pat Deegan@mars.example.com CATEGORIES:Commercial FN:Lexmark Optra E310 N:Lexmark Optra E310; TEL;TYPE=work,pref:800-539-6275 END:VCARD BEGIN:VCARD [...] Attempting to ImportIn a perfect world, you would simply transfer the file over to your iPAQ, then use the gpe-contacts application to import the list of vcards.
Unfortunately, at present this method only works for GPE-Contacts Import WorkaroundPending our eventual submission of a patch for gpe-contacts or the vcard library, two tricks allow us to get around this. First we begin by splitting up the vCard file into a number of single entry files. Then we do our best to automate importing all these files into gpe-contacts. On your desktop system, create a directory into which we will place the vcard files and move into it: $ mkdir ~/vcards $ cd ~/vcards Save the following perl script onto your desktop system:
#!/usr/bin/perl
my $file = shift @ARGV || die "Gimme a file name to split up";
die "ugh - can't open '$file': $!" unless (open(INFILE, "<$file"));
my $contents; # will hold entire vcard file contents
{
$/ = undef; # undef record separator
$contents =
For instance, as ~/vcards/vcardsplitter.pl and ensure you make it executable:
$ chmod a+x ~/vcards/vcardsplitter.pl From within your vcard directory, run the splitter script by passing it the path to the vCards file exported from J-Pilot, e.g. $ ./vcardsplitter.pl /path/to/contact.vcards In a few moments, you should have a number of vcard files in the directory: $ ls vcard0.txt vcard136.txt vcard174.txt vcard27.txt vcard65.txt vcard1.txt vcard137.txt vcard175.txt vcard28.txt vcard66.txt vcard10.txt vcard138.txt vcard176.txt vcard29.txt vcard67.txt vcard100.txt vcard139.txt vcard177.txt vcard3.txt vcard68.txt vcard101.txt vcard14.txt vcard178.txt vcard30.txt vcard69.txt ... Tar up all those files and move them over to your iPAQ: $ tar jcf ~/allMyVcards.tar.bz2 ~/vcards $ scp ~/allMyVcards.tar.bz2 user@usbipaq:~/ramdisk/ Finally, log into your iPAQ through SSH and issue the following commands: user@h3600:~/ramdisk$ tar jxf allMyVcards.tar.bz2 user@h3600:~/ramdisk$ cd vcards user@h3600:~/ramdisk/vcards$ for i in vcard*.txt; do echo $i; gpe-contacts -i $i; done
For each vCard imported, you should see a small "File vcardNNN.txt imported sucessfully"[sic] dialog appear. Your only, admittedly boring, job is to click ok for each vcard imported. Some imports may fail, and these may need to be retried or entered manually, but most will be imported automatically into your iPAQ contact list. That's it: your address book information is now stored on your iPAQ. Migrating other useful Palm data should be possible using similar methods, since J-Pilot is cool enough to allow exporting pretty much all the standard Palm-app data. More details to follow in subsequent articles. |
|
| Level: | Tutorial |
| Additional Article Data | |
| Level: | Tutorial |
| Comments |
|---|
|
|
|
The comments are owned by the poster. We aren't responsible for their content.
|
| Jump to section |
|---|


Before you begin, you should have 

