X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Falbum.git;a=blobdiff_plain;f=iphoto-util.el;h=5b01200cb522315072ea698e9ed887a227e6304d;hp=4a53fc82eda67863fe12426e1140cd4b44187206;hb=97aae194eb5410ff8dd962e0f903ee6a777bf8d6;hpb=227fb378ce6da03717fd020dd5cbc4fa639aeaba
diff --git a/iphoto-util.el b/iphoto-util.el
index 4a53fc8..5b01200 100644
--- a/iphoto-util.el
+++ b/iphoto-util.el
@@ -17,15 +17,26 @@
;; (buffer-substring (match-end 0)(point-at-eol)))))
;;; for exif 0.6.15
+;; (defun exif-image-file-date-time-original (image-file)
+;; (with-temp-buffer
+;; (call-process "exif" nil t nil
+;; "-x" (expand-file-name image-file))
+;; (goto-char (point-min))
+;; (if (re-search-forward
+;; "\\([^<>]+\\)"
+;; nil t)
+;; (match-string 1))))
+
+;;; for exiftime Version 1.01
(defun exif-image-file-date-time-original (image-file)
(with-temp-buffer
- (call-process "exif" nil t nil
- "-x" (expand-file-name image-file))
+ (call-process "exiftime" nil t nil
+ (expand-file-name image-file))
(goto-char (point-min))
(if (re-search-forward
- "\\([^<>]+\\)"
+ "^Image Generated: "
nil t)
- (match-string 1))))
+ (buffer-substring (match-end 0)(point-at-eol)))))
;; (directory-files
;; "~/Pictures/iPhoto Library/Originals/2006/")
@@ -140,10 +151,14 @@
(unless (file-exists-p album-dir)
(make-directory album-dir 'parents))
(dolist (file (directory-files dir 'full nil 'no-sort t))
- (call-process "cp" nil nil nil
- "-al"
+ (call-process "ln" nil nil nil
file
- album-dir))
+ album-dir)
+ ;; (call-process "gcp" nil nil nil
+ ;; "-al"
+ ;; file
+ ;; album-dir)
+ )
(with-temp-buffer
(insert ";; -*- mode: emacs-lisp; coding: utf-8-jp-er; -*-\n")
(insert (pp (list
@@ -172,16 +187,22 @@
((string= (downcase (file-name-extension file)) "jpg")
(unless (file-exists-p album-dir-original)
(make-directory album-dir-original 'parents))
- (call-process "cp" nil nil nil
- "-al"
+ (call-process "ln" nil nil nil
file
album-dir-original)
+ ;; (call-process "gcp" nil nil nil
+ ;; "-al"
+ ;; file
+ ;; album-dir-original)
)
(t
- (call-process "cp" nil nil nil
- "-al"
+ (call-process "ln" nil nil nil
file
album-dir)
+ ;; (call-process "gcp" nil nil nil
+ ;; "-al"
+ ;; file
+ ;; album-dir)
))
)
(call-process "chgrp" nil nil nil