Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Add an iPhone call log to iCal via AppleScript' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Add an iPhone call log to iCal via AppleScript
Authored by: Supp0rtLinux on Tue, Aug 26 2008 at 12:14PM PDT
The correct code to have it show minutes instead of seconds is:
newEvent.setNotes("Length of call: " + (call.duration/60).to_s + " minutes")
Of course, this means that for 1 minute phone calls, it will say "1 minutes". So, perhaps a Ruby expert could add the logic for an if/then statement to say basically if less than or equal to 1 then "minute", else if greater than 1, then minutes. I could do this in a shell script or perl, but my Ruby skills are sub-par.

Also note that the file in /usr/local/bin is likely restricted. You will need to do something like

sudo vi /usr/local/bin/calllog2ical.rb
to be able to edit it properly.

[ Reply to This | # ]
Add an iPhone call log to iCal via AppleScript
Authored by: jedmtnman on Tue, Aug 26 2008 at 2:01PM PDT
i had replied to this but it was buried in the thread. Thanks for adding the bit about the sudo. I expected most folks to edit with bbedit, etc and to "save as admin"

jed



[ Reply to This | # ]