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

bbdb and PilotManagers SyncAB.pm



Rather new to all this Pilot Things, i am currently writing an
Enhancement to SyncAB.pm for syncing BBDB's Entries into my Palm.
Alan already helped me in private Mail.

I didn't liked the Lisp Versions because they didn't get my BBDB
Entries right.  And since i don't speak lisp, i was stuck.

Some 5 Minutes ago, i dicovered Dinesh Dutts Standalone Perl Programm,
which he posted to this Mailinglist,  Cc to you, Dinesh.

Moving BBDB Information into the Palm is rather difficult and depends
on personal preferences, since the Format isn't the same.  At least i
tried to have all Infos from my BBDB into the palm in a controlled
way.

Bugs:  

 o Not tested from anyone than me.
 o Cannot sync from Palm to BBDB, currently all AdressDB Entries get
   lost. It really is One Way!
 o I don't know nothing about archived records.
 o Doesn't handle private Records.
 o Could someone explain me what `updatetop' is?
 o Looks like Basic.  Perhaps You think i can program in Perl as good
   as in Lisp...
 o #include "your.bug"
 
Quite impressive List ;-).  Now the good side:

Features:

On my Todo List is to move the following Vars into a nice perl/Tk
Click Dialog.  I'll try to explain the Features with explaining the
Vars. 

    my @BBDB_DEFAULTCATEGORY = ('BBDB',1); 
    # You can have a Default Category in which BBDBs Entries are moved 
    # inside Palm.  But You can select the Category for every single
    # Record, too.

    my $BBDB_SAVE_SOME_PHONE = 'True';
    # If you have more Phonenumbers in Your BBDB than AddressDB can
    # handle, save them in the Notes Field.

    my $BBDB_NO_NOPHONE = 'True';
    # Ignore Entries without Phonenumbers.

    my $BBDB_SAVE_SOME_ADDRESS = 'True';
    # BBDB can hold more than one (postal) Address, save them in Notes
    # Field?

    my $BBDB_SAVE_SOME_MAIL = 'True';
    # The same for Mail Addresses.  Special Care is taken to have at
    # least one Mail Address in Palms DB, if it would be already full
    # with Phone Numbers. (5 Numbers/Mail is the Limit AFAIK)

    # Regexps to match BBDB's Phone Locations to Palm Entries.  The
    # initial reason for me to write this.
    my $BBDB_M_WORK='work|company|firma';
    my $BBDB_M_HOME='home|heim|privat|bonn|vinxel';
    my $BBDB_M_FAX='faksim|fax';
    my $BBDB_M_MAIN='main';
    my $BBDB_M_PAGER='pager|skyper|scall';
    my $BBDB_M_MOBILE='mobil|handy|d1|d2|eplus|viag';

    my $BBDB_SKIP_FIELDS='timestamp|creation-date';
    # Some BBDB User Fields to ignore

    my $BBDB_PALM_FIELD='palm';
    # Create a BBDB User Field with this name to select the Category
    # You wish the Record should appear in Your Palm.    

    my $BBDB_PALM_FIELD_IGNORE='ignore';
    # Special Value for $PALM BBDB Field to skip this Record

So, if you have eg a `Birthday' Field in Your BBDB and name one of the
Custom Fields in the Palm the same, the Values get into the right
field.  Otherwise, it would appear in the Notes field as `Birthday:
bla'.  I recommend to insert a Notes and palm Field in the BBDB, but
this is not necessary.

I'll happily mail my modified SyncAB.pm to anyone who wants it.  Just
ask.  Perhaps i'll post a diff to the Mailinglist.  Please send
Bugreports (send diffs ;-).  And i still don't know how to sync the
other Way.  PilotSync knows magically about the Diff, perhaps one can
send them via Mail to bbdb-snarf them?

Dinesh, You rebuild the bbdb from your perl script, what is (x)emacs
thinking about modifying the file while running?


Thanks,
Aldo
------------------------------------------------------------------------
***********************************************************
*             This is a public mailing list!              *
* Please do not publish Sun proprietary information here! *
*        -  -  -  -  -  -  -  -  -  -  -  -  -  -         *
*             http://www.moshpit.org/pilotmgr             *
***********************************************************


SourceForge.net Logo