{"id":1055,"date":"2011-01-17T06:53:20","date_gmt":"2011-01-16T21:53:20","guid":{"rendered":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/?p=1055"},"modified":"2011-08-26T22:32:05","modified_gmt":"2011-08-26T13:32:05","slug":"aperture%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\/1055","title":{"rendered":"Aperture\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u81ea\u52d5\u5206\u5272"},"content":{"rendered":"<p>Aperture \u6700\u5927\u306e\u4e0d\u6e80\u304c\u3053\u306e iPhoto \u306b\u3042\u3063\u305f\u6a5f\u80fd\u304c\u306a\u3044\u3053\u3068<span style=\"color: #888888;\">(\u7d50\u5408\u306f\u3042\u308b\u306e\u306b!!)<\/span>\u3002\u8907\u6570\u306e\u30ab\u30e1\u30e9\u3067\u64ae\u3063\u305f\u5199\u771f\u3092\u65e5\u4ed8\u6bce\u306b\u5206\u3051\u3066\u308b\u306e\u3067\u3001\u8aad\u307f\u8fbc\u307f\u6642\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5206\u5272\u3060\u3068\u540c\u3058\u65e5\u4ed8\u3067\u8907\u6570\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u51fa\u6765\u3061\u3083\u3046\u3057\u3001\u304b\u3068\u8a00\u3063\u3066\u624b\u52d5\u3067\u5206\u5272\u306f\u30c0\u30eb\u304f\u3066\u3084\u3063\u3066\u3089\u3093\u306a\u3044\u3002<\/p>\n<p>\u3068\u3086\u30fc\u3053\u3068\u3067\u3001<a href=\"http:\/\/developer.apple.com\/library\/mac\/documentation\/AppleScript\/Conceptual\/AppleScriptLangGuide\/AppleScriptLanguageGuide.pdf\">AppleScript Language Guide<\/a> \u3084 <a href=\"http:\/\/images.apple.com\/jp\/aperture\/resources\/pdf\/Aperture_3_AppleScript_Reference.pdf\">Aperture 3 AppleScript Reference<\/a>\u3092\u898b\u306a\u304c\u3089 AppleScript \u3068\u683c\u95d8\u3057\u3066\u305f\u3089\u305d\u308c\u3063\u307d\u3044\u3082\u306e\u304c\u51fa\u6765\u4e0a\u304c\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002\u3067\u3082\u3082\u3063\u3068\u4e0a\u624b\u3044\u89e3\u6c7a\u65b9\u6cd5\u304c\u3042\u3063\u305f\u3089\u6559\u3048\u3066\u5049\u3044\u4eba!<\/p>\n<p><span style=\"color: #888888;\">(2011\/8\/26 \u8ffd\u8a18)<\/span>\u901f\u304f\u3067\u304d\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u3001\u3068<a href=\"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2011\/1385\">\u3061\u3087\u3063\u3068\u9811\u5f35\u3063\u3066\u307f\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3053\u3061\u3089<\/a><\/p>\n<p><!--more--><\/p>\n<p>\u9069\u5f53\u306b\u5199\u771f\u3092\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<ol>\n<li>\u64ae\u5f71\u65e5\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8<span style=\"color: #888888;\">(YYYY\u5e74MM\u6708DD\u65e5)<\/span>\u304c\u7121\u304b\u3063\u305f\u3089\u4f5c\u6210<\/li>\n<li>\u5199\u771f\u3092\u64ae\u5f71\u65e5\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u79fb\u52d5<\/li>\n<\/ol>\n<p>\u3068\u3086\u30fc\u611f\u3058\u306b\u52d5\u304d\u307e\u3059\u3001\u591a\u5206\u2026\u3002 AppleScript \u306f\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u64ae\u5f71\u65e5\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u30d5\u30a9\u30eb\u30c0\u306e\u914d\u4e0b\u306b\u3042\u3063\u3066\u3082\u8a8d\u8b58\u3059\u308b\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u5f8c\u306f\u9069\u5f53\u306a\u5834\u6240\u306b\u52d5\u304b\u3057\u3066\u3082\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u3053\u3068\u306f\u306a\u3044\u307f\u305f\u3044\u2026?<\/p>\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3042\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u5168\u90e8\u306a\u3081\u308b\u306e\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u30c7\u30ab\u3051\u308c\u3070\u30c7\u30ab\u3044\u307b\u3069\u9045\u304f\u306a\u308b\u306e\u306f\u304a\u7d04\u675f :) \u3002\u3068\u3044\u3046\u304b\u3082\u3046\u3061\u3087\u3063\u3068\u30b9\u30de\u30fc\u30c8\u306b\u66f8\u3051\u306a\u3044\u306e\u304b\u306a\u30fc<\/p>\n<pre>tell application \"Aperture\"\r\n  set imageSel to (get selection)\r\n  if imageSel is {} then\r\n    error \"Please select an image.\"\r\n  else\r\n    repeat with i from 1 to count of imageSel\r\n      tell (item i of imageSel)\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      end tell\r\n      tell library 1\r\n        set flagProj to false\r\n        set projSel to get name of every project\r\n        repeat with existProj in projSel\r\n          if contents of existProj is equal to projname then\r\n            set flagProj to true\r\n            exit repeat\r\n          end if\r\n        end repeat\r\n        if flagProj is false then\r\n          make new project with properties {name: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 \u6700\u5927\u306e\u4e0d\u6e80\u304c\u3053\u306e iPhoto \u306b\u3042\u3063\u305f\u6a5f\u80fd\u304c\u306a\u3044\u3053\u3068(\u7d50\u5408\u306f\u3042\u308b\u306e\u306b!!)\u3002\u8907\u6570\u306e\u30ab\u30e1\u30e9\u3067\u64ae\u3063\u305f\u5199\u771f\u3092\u65e5\u4ed8\u6bce\u306b\u5206\u3051\u3066\u308b\u306e\u3067\u3001\u8aad\u307f\u8fbc\u307f\u6642\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5206\u5272\u3060\u3068\u540c\u3058\u65e5\u4ed8\u3067\u8907\u6570\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u51fa\u6765\u3061\u3083\u3046\u3057\u3001 [&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-1055","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\/1055","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=1055"}],"version-history":[{"count":9,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1055\/revisions"}],"predecessor-version":[{"id":1070,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1055\/revisions\/1070"}],"wp:attachment":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/media?parent=1055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/categories?post=1055"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/tags?post=1055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}