[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] categories in p5-Palm



Andrew Arensburger and others,

I have my addressbook in semi-colon deliminated flat-file text
database. Now that I have a Palm Pilot, I want to put the addressbook
on the Palm. The translation is one way, I do not want to go from the
Palm back to the addressbook on my RedHat Linux 6.2 machine.

The approach I used was to use p5-Palm (version 1.1.12) with a perl
script to read my addressbook, split the fields, and assign them to
the correct .pdb fields. It works great, except all the entries are in
the "Unfiled" category. So...

How do I create a category in the appinfo field?

How do I assign a category to a record?

How do I print the category for a record so I can check the operation?

I am not on the list, please cc me as well.

The script looks something like...

use Palm::Raw;
use Palm::Address;

$pdb = new Palm::Address;

open( AB, "< people.dat") or die "Cannot open people.dat\n";

$index = 0;
while ( <AB> )
{
        @fields = split /;/, $_;

        $pdb->append_Record;
        $record = $pdb->{records}[ $index ];

        # build up record
        $record->{fields}{firstName} = $fields[ 0 ];
        $record->{fields}{name} = $fields[ 1 ];

        # check record
        print "$record->{fields}{firstName} ";
        print "$record->{fields}{name}\n";

        $index++;
}

$pdb->Write( 'AddressDB.pdb' );


Thanks,
Bobby

-- 
Bobby "the fox" de Vos          bobby@devos.org
ECE - Georgia Tech              http://www.devos.org/bobby


-- 
Bobby "the fox" de Vos          bobby@devos.org
ECE - Georgia Tech              http://www.devos.org/bobby

--
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.