Ok, I didn't want to go messing around with some of the other large packages so I thought I would quickly write a perl script to do various merging of data and write it back to the palm and back to bbdb. The result: a lot more wasted time than I was originally planning on. However, it does actually work. It's only requirement is to have a recent pilot-link installed...
Fundamentally it does this: 0) saves N backup copies of previous files and the .bbdb file just in case. 1) calls gnudoit to call bbdb-to-pilot-file to save a CSV from the jwz code. 2) calls pilot-addresses to save a CSV from the pilot 3) compares both of the above plus an archive from last run looking for matches and doing appropriate things when possible. It doesn't currently handle modifications to a record on both sides though. I am, however, planning on handling that in the future. 4) writes out a CSV file for the pilot and the new "archive" for comparing against next time. 5) calls pilot-addresses to delete the old BBDB category. (*) 6) calls pilot-addresses to load the new merged archive into the BBDB category. 7) calls gnudoit to load a bunch of elisp that was written by the sync program to modify bbdb-records. Overall, I think this is working fine. I haven't done a huge amount of playing with it yet, but I just ran it successfully today to get it to merge things together after BBDB had changed quite a bit. Large changes to the pilot records aren't well supported yet (new contacts don't get auto-turned into elisp code yet, for example) but simple ones are (phone number changes, etc). Anyone interested? Anyone think I'm doing something horribly wrong in the above algorithm? -- "In the bathtub of history the truth is harder to hold than the soap, and much more difficult to find." -- Terry Pratchett ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/