;; (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
+;; "<Date_and_Time__original_>\\([^<>]+\\)</Date_and_Time__original_>"
+;; 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
- "<Date_and_Time__original_>\\([^<>]+\\)</Date_and_Time__original_>"
+ "^Image Generated: "
nil t)
- (match-string 1))))
+ (buffer-substring (match-end 0)(point-at-eol)))))
;; (directory-files
;; "~/Pictures/iPhoto Library/Originals/2006/")
(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
((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