| Fraser Speirs ( @ 2004-11-24 10:18:00 |
Flickr Folder Action
So there are times when I don't want to import something into iPhoto just to use my exporter to send it to Flickr. Screenshots, for example. I wrote an Applescript folder action which, when files are added to a folder, will upload them to Flickr.
It uploads them initially private and tags them with "unfiled" so I can easily find them later. Yeah, it's pretty poor with respect to error handling or feedback, but it does the quick and dirty job I want from it.
So there are times when I don't want to import something into iPhoto just to use my exporter to send it to Flickr. Screenshots, for example. I wrote an Applescript folder action which, when files are added to a folder, will upload them to Flickr.
on adding folder items to this_folder after receiving these_items
repeat with x in these_items
set theCmd to "/usr/bin/curl -F email=me@my.org -F password=foobar -F tags=\"unfiled\" -F is_public=0 -F is_friends=0 -F is_family=0 -F photo=@" & (POSIX path of x) & " http://www.flickr.com/tools/uploader_go.gne"
do shell script theCmd
end repeat
display dialog "Uploaded " & (count of these_items) & " images" buttons "OK" default button "OK"
end adding folder items to
It uploads them initially private and tags them with "unfiled" so I can easily find them later. Yeah, it's pretty poor with respect to error handling or feedback, but it does the quick and dirty job I want from it.