[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] Re: Palm-AddressDB Categories
On 16 Feb 2001 owner-coldsync-hackers@wallace.lusars.net wrote:
[This bounced, but it's an interesting question, so I'm forwarding the
gist and my answer to the list. -- AA]
> Is it possible to create a new category in AddressDB while leaving
> the current ones as they are?
>
> Here is the situation. Each person in my company has their Palm
> with their own contacts, but each person would like to have a special
> category in their Address book which only contains the
> company phone/address/email list.
>
> I can make the new pdb, but when it gets installed it overwrites
> the currently installed Address book. Definitely not what I want
> to happen.
>
> So I am curious if anyone knows how to 'merge' the users current Address
> book with the output of the perl program I wrote to parse the comma
> separated list.
>
> The perfect scenario would be to keep whatever they have in their
> current address book, and add a new category which contains
> the new listings. I would even be happy with a totally new type
> of address book....if the above can't be accomplished.
The way I'd do this is with a Fetch conduit: it should read the
existing AddressDB.pdb (or create it if it doesn't exist), then:
- Create the "Company" category if it doesn't exist. Use
&Palm::StdAppInfo::addCategory for this.
- Read the company-wide address book from
/usr/local/etc/company-phone-book, or wherever it lives.
- For each address in the company phone book, add it to
AddressDB.pdb (and mark it dirty) if it isn't already there.
- For each record in AddressDB.pdb in category "Company", if
it's not in the company address book, mark it deleted.
There's no need for a corresponding Dump conduit since,
presumably, you want desktop-overwrites-Palm.
You can stick this conduit in /usr/local/etc/coldsync.conf if
you're running version 1.5.1 or later.
--
Andrew Arensburger This message *does* represent the
arensb@ooblick.com views of ooblick.com
ZenCrafters: Total Enlightenment, in about an hour.
--
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.