{"id":1385,"date":"2011-08-26T22:29:16","date_gmt":"2011-08-26T13:29:16","guid":{"rendered":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/?p=1385"},"modified":"2011-08-26T22:29:16","modified_gmt":"2011-08-26T13:29:16","slug":"%e7%b6%9a%e3%83%bbaperture%e3%83%97%e3%83%ad%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%81%ae%e8%87%aa%e5%8b%95%e5%88%86%e5%89%b2","status":"publish","type":"post","link":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2011\/1385","title":{"rendered":"\u7d9a\u30fbAperture\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u81ea\u52d5\u5206\u5272"},"content":{"rendered":"<p>Aperture \u30b9\u30ec\u306b\u89e6\u767a\u3055\u308c\u3066<a href=\"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2011\/1055\">\u524d\u306b\u66f8\u3044\u3066\u653e\u7f6e\u3057\u3068\u3044\u305f\u30b9\u30af\u30ea\u30d7\u30c8<\/a>\u306e\u9ad8\u901f\u5316\u306b\u30c8\u30e9\u30a4\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u30cf\u30c3\u30b7\u30e5\u5927\u597d\u304d\u3063\u5a18\u306a\u306e\u3067\u305d\u308c\u306b\u8fd1\u3044\u3082\u306e\u304c\u306a\u3044\u304b\u306a\u30fc\u3001\u3068\u8abf\u3079\u305f\u3089 AppleScript \u3067\u306f\u30ec\u30b3\u30fc\u30c9\u3068\u3044\u3046\u3082\u306e\u304c\u30cf\u30c3\u30b7\u30e5\u76f8\u5f53\u3089\u3057\u3044\u3002\u3093\u3060\u3051\u3069\u3001 list \u3067\u4ffa\u304c\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3067\u304d\u305f\u306e\u3067<\/p>\n<ul>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u305f\u3068\u304d\u306b\u65e2\u5b58\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u3092 list \u306b\u7a81\u3063\u8fbc\u3080(\u521d\u56de\u306e\u307f)<\/li>\n<li>\u5199\u771f\u3092\u8aad\u3080\u3054\u3068\u306b list \u3068\u6bd4\u8f03\u3057\u3066\u30de\u30c3\u30c1\u3057\u306a\u3051\u308c\u3070\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/li>\n<\/ul>\n<p>\u3068\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u9ad8\u901f\u5316\u3001\u3068\u3044\u3046\u3088\u308a\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\/\u5199\u771f\u304c\u591a\u304f\u306a\u3063\u305f\u3068\u304d\u306b\u9045\u304f\u306a\u3089\u306a\u3044\u3001\u3068\u3044\u3046\u65b9\u5411\u3067\u3059\u3051\u3069\u306d\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u3067\u52d5\u304b\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u78ba\u304b\u306b\u901f\u304f\u306a\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u4e00\u756a\u6761\u4ef6\u304c\u826f\u304f\u3066 90 \u79d2\u304b\u304b\u3063\u3066\u3044\u305f\u3082\u306e\u304c 60 \u79d2\u306b\u7e2e\u3093\u3060\u3050\u3089\u3044? \u671f\u5f85\u3088\u308a\u3082\u901f\u304f\u306a\u3063\u3066\u306a\u3044\u3068\u3044\u3046\u304b\u5199\u771f\u4e00\u679a\u306b\u3064\u304d 1 \u79d2\u4ee5\u4e0a\u304b\u304b\u3063\u3066\u308b\u3088\u3046\u3058\u3083\u306a\u3041\u3002<\/p>\n<p>\u3064\u3044\u3067\u306b\u9078\u3093\u3060\u5199\u771f\u306e\u4e2d\u306b RAW \u304c\u5165\u3063\u3066\u308b\u3068 EXIF \u304c\u53d6\u5f97\u3067\u304d\u306a\u304f\u3066\u6b62\u307e\u3063\u3061\u3083\u3046\u3068\u3044\u3046\u30d0\u30b0\u3082\u30cf\u30c3\u30b1\u30bd\u3057\u3066\u3057\u307e\u3044\u3001\u306a\u3093\u3060\u304b\u3044\u3084\u30fc\u306a\u6c17\u5206\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u305b\u3063\u304b\u304f\u3060\u304b\u3089\u516c\u958b\u3059\u308b\u3051\u3069\u3082\u3063!<\/p>\n<pre>tell application \"Aperture\"\r\n  set imageSel to (get selection)\r\n  set checkprojects to false\r\n  if imageSel is {} then\r\n    error \"Please select an image.\"\r\n  else\r\n    set imgdate to \"\"\r\n    repeat with i from 1 to count of imageSel\r\n      tell (item i of imageSel)\r\n        if not (imgdate is equal to value of EXIF tag \"ImageDate\") then\r\n          set imgy to round (value of EXIF tag \"CaptureYear\") as number\r\n          set imgm to round (value of EXIF tag \"CaptureMonthOfYear\") as number\r\n          set imgd to round (value of EXIF tag \"CaptureDayOfMonth\") as number\r\n          if length of (imgm as string) = 1 then\r\n            set imgm to \"0\" &amp; imgm\r\n          end if\r\n          if length of (imgd as string) = 1 then\r\n            set imgd to \"0\" &amp; imgd\r\n          end if\r\n          set projname to (imgy as string) &amp; \"\u5e74\" &amp; (imgm as string) &amp; \"\u6708\" &amp; (imgd as string) &amp; \"\u65e5\"\r\n          set imgdate to value of EXIF tag \"ImageDate\"\r\n        end if\r\n      end tell\r\n      tell library 1\r\n        if checkprojects is false then\r\n          set projlist to {}\r\n          set projSel to get name of every project\r\n          repeat with existProj in projSel\r\n            set projlist to projlist &amp; {contents of existProj}\r\n          end repeat\r\n          set checkprojects to true\r\n        end if\r\n        if projlist does not contain projname then\r\n          make new project with properties {name:projname}\r\n          set projlist to projlist &amp; {projname}\r\n        end if\r\n      end tell\r\n      move item i of imageSel to project projname\r\n    end repeat\r\n  end if\r\nend tell<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Aperture \u30b9\u30ec\u306b\u89e6\u767a\u3055\u308c\u3066\u524d\u306b\u66f8\u3044\u3066\u653e\u7f6e\u3057\u3068\u3044\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u9ad8\u901f\u5316\u306b\u30c8\u30e9\u30a4\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u30cf\u30c3\u30b7\u30e5\u5927\u597d\u304d\u3063\u5a18\u306a\u306e\u3067\u305d\u308c\u306b\u8fd1\u3044\u3082\u306e\u304c\u306a\u3044\u304b\u306a\u30fc\u3001\u3068\u8abf\u3079\u305f\u3089 AppleScript \u3067\u306f\u30ec\u30b3\u30fc\u30c9\u3068\u3044\u3046\u3082\u306e\u304c\u30cf\u30c3\u30b7\u30e5\u76f8 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[49,77,23],"class_list":["post-1385","post","type-post","status-publish","format-standard","hentry","category-mac","tag-aperture","tag-mac","tag-software"],"_links":{"self":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/comments?post=1385"}],"version-history":[{"count":12,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1385\/revisions"}],"predecessor-version":[{"id":1397,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1385\/revisions\/1397"}],"wp:attachment":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/media?parent=1385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/categories?post=1385"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/tags?post=1385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}