Duplicates duplicates duplicates…

Earlier I mentioned iCal and Palm Desktop as two possible solutions for my desktop calendar. To integrate with Oracle Calendar, both of these apps would require me to manually import the Oracle Calendar data in vCal format. Oracle Calendar’s export function gives me several options for choosing what data gets exported. I can export entries within a specific date range (from 1/31/2004 through 12/31/2006 for example), I can export a relative date range (1 year in the past through 2 years in the future), or I can export the entire enchilada (data that dates back to early 1999, in my case). In the past, I’ve gone with a relative date range starting 1 year in the past and going 2 years in the future. Reason being, exporting the whole thing is kind of slow and there’s no bounds on the size of the data set being exported, so it will keep getting slower and slower the more data I accumulate in Oracle Calendar.

Now, with a 3-year date window, it’s a given that I’ll be exporting a lot of the same data over and over, and importing the duplicate data into iCal or Palm Desktop. Neither of these apps has what I would call an “intelligent” import feature. That is, if I import data more than once, it will show up multiple times in the application. This isn’t a show stopper, but duplicates are undesirable and we need a way to prevent this from happening.

One way to do this would be to just import the data, then cobble something up (in Perl, perhaps) to strip out the duplicate entries. This would require the ability to manipulate the calendar app’s data outside of the calendar app itself, so presumably it would rely on the app using some kind of standard, documented format to store its data. My surfing reveals that someone has done this with iCal, so this may be possible if iCal is my solution. Dunno about Palm Desktop, but intend to find out.

Another way to do it would be to simply delete all of the previously imported data out of the calendar, than re-import. If I went this route, I would need a way to differentiate imported data from other data inside the calendar, so I can delete just the imported data and nothing else. Then, I’d need the ability to do a bulk delete, ether from within the app’s GUI, or (once again) by manipulating the app’s data with an external script.

Both of these methods will require a relatively robust Palm sync app, so that deleted entries are picked up and properly deleted off the Palm. Otherwise we’ll still end up with duplicate entries on the Palm.

Next I’ll look at Palm Desktop and iCal more closely, to see if either will work as part of my evil plan.