Re: Dumb iPhoto question
Re: Dumb iPhoto question
- Subject: Re: Dumb iPhoto question
- From: "Mark J. Reed" <email@hidden>
- Date: Sun, 27 Jun 2010 21:07:24 -0400
On Sun, Jun 27, 2010 at 8:51 PM, Shane Stanley
<email@hidden> wrote:
On 28/6/10 10:31 AM, "Mark J. Reed" <
email@hidden> wrote:
> I can copy the raw file directly
I think you answered your own question...
I suppose so. But see my followup.
Background: I'm trying to write a script for my father that will copy files out of his iPhoto library onto an SD card so he can take them in to the store to get prints. (Yes, this is a primitive approach. We're working up to getting him comfortable ordering prints by mail from an online service. He's looking into getting a photo printer but is daunted by the relatively high per-print expense.)
So I can copy the photo files onto the SD card, but once I've copied, they still don't show up in the mounted card in iPhoto unless I eject and remount the card (and the easiest way to do that is to physically remove and re-insert it). I'd like to have some visible confirmation that the copy was successful...
Incidentally, I decided to go with rb-appscript after starting to write the AS to figure out the next available DSC_nnnn.JPG filename. So the actual script is somewhat off-topic for this list, but in case anyone's curious:
#!/usr/bin/ruby
require 'ftools'
require 'generator'
require 'rubygems'
require 'appscript'
target = Dir.glob("/Volumes/*/DCIM/*")[0]
fileGen = Generator.new do |g|
n = 0
while true
n += 1
f = "#{target}/DSC_d.JPG" % n
g.yield f unless File.exists? f
end
end
iPhoto = Appscript.app('iPhoto')
iPhoto.selection.get.each do |p|
File.copy(p.image_path.get, fileGen.next)
end
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden