Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > iCal - File structure change in Tiger?

iCal - File structure change in Tiger?
Thread Tools
kcmac
Mac Elite
Join Date: Jan 2001
Location: Kansas City, Mo
Status: Offline
Reply With Quote
May 5, 2005, 12:00 AM
 
I noticed now that I do not have calendars listed in ~/library/calendars.

I look in ~/library/application support/ical and have some files and in the Sync Services folder. (Also have another folder named Sync Service with no s on end of service.)

The files also have some crazy labeling scheme. They are not labeled the same as in iCal. Am I seeing things? Why was this done?
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 5, 2005, 12:09 AM
 
I think the idea is that they generalized iCal's calendars, so they need not be simple .ics files (like the birthday calendar, for example). They also moved some of the settings like subscription information locally to each calendar's folder.

I wrote this little Perl script to make symlinks into the old ~/Library/Calendars location, if you use them for any reason (I use those files to show availability information on my work homepage...)
Code:
#!/usr/bin/perl use warnings; use strict; # FILE: ical_links.pl # AUTHOR: Mithras The Prophet (mithras.the.prophet, which is a gmail account) # PURPOSE: makes symlinks from new Tiger iCal calendars to old ~/Library/Calendars location # HISTORY: # 04/26/2005 - initial version # ## Settings my $source_dir="$ENV{HOME}/Library/Application Support/iCal/Sources"; my $source_calendar_filename="corestorage.ics"; my $target_dir="$ENV{HOME}/Library/Calendars"; ## # # 1. scan the source directory for appropriate calendars my @calendars; # this will hold hashes of name & location opendir(SOURCE_DIR, $source_dir) or die("Can't access source calendars in '$source_dir'\n"); while (my $subdir = readdir(SOURCE_DIR)) { # only use .calendar directories that have a corestorage file if (-d "$source_dir/$subdir" && $subdir =~ m/\.calendar$/ && (-e "$source_dir/$subdir/$source_calendar_filename")) { # We have an appropriate calendar # 2. record the location my %thiscal; $thiscal{'location'} = "$source_dir/$subdir/$source_calendar_filename"; # 3. Extract the calendar title open (CAL_INFO, "$source_dir/$subdir/Info.plist") or die("Can't get information on calendar: $source_dir/$subdir\n"); my $title_next = 0; while (<CAL_INFO>) { if (m/<key>Title<\/key>/) { $title_next = 1; } if ($title_next && m/<string>([^<]+)<\/string>/) { $thiscal{'title'} = $1; $title_next = 0; } } close(CAL_INFO); # 4. Add this calendar to the list push(@calendars, \%thiscal); } } close( SOURCE_DIR ); # # Step 5: make symlinks # foreach my $cal_ref (@calendars) { my $newfile = $target_dir . '/' . $cal_ref->{'title'} . '.ics'; print "Linking $newfile -> " . $cal_ref->{'location'} . "\n"; symlink( $cal_ref->{'location'}, $newfile ); ; }
     
kcmac  (op)
Mac Elite
Join Date: Jan 2001
Location: Kansas City, Mo
Status: Offline
Reply With Quote
May 5, 2005, 12:35 AM
 
Holy cow Mithras. You are in a different stratosphere! I'm a low flyin' bird.

Okay. So I guess they did change things. Now my next questions.

Syncing to .Mac. Calendars not showing up. Is this working yet?

How do I do a simple backup of my calendars. Used to just go the calendars file, option click and drag into a folder.

Now I am stumped. I do backups on an external disk but I am very guarded of my addressbook and iCal. Addressbook has a built in backup feature. Not so for iCal. Any ideas?

EDIT: Just realized that iCal has a database backup command in the menubar. Nice. (Maybe this was with Panther? If so, feel like a real clown.)
( Last edited by kcmac; May 5, 2005 at 12:56 AM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:44 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,