;; (if (re-search-forward "^[ \t]*Timestamp: " nil t)
;; (buffer-substring (match-end 0)(point-at-eol)))))
+;;; for exif 0.6.9
+;; (defun exif-image-file-date-time-original (image-file)
+;; (with-temp-buffer
+;; (call-process "exif" nil t nil
+;; "-t" "DateTimeOriginal"
+;; (expand-file-name image-file))
+;; (goto-char (point-min))
+;; (if (re-search-forward "^[ \t]*Value: " nil t)
+;; (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
- "-t" "DateTimeOriginal"
+ (call-process "exiftime" nil t nil
(expand-file-name image-file))
(goto-char (point-min))
- (if (re-search-forward "^[ \t]*Value: " nil t)
+ (if (re-search-forward
+ "^Image Generated: "
+ nil t)
(buffer-substring (match-end 0)(point-at-eol)))))
;; (directory-files
(when (and (not (string-match "^\\.+$" dir))
(setq dir (expand-file-name dir base-dir))
(file-directory-p dir)
- (setq ret (nth 5 (file-attributes dir)))
- (or (> (car ret)(car date-time))
- (and (= (car ret)(car date-time))
- (>= (nth 1 ret)(nth 1 date-time))))
+ ;; (setq ret (nth 5 (file-attributes dir)))
+ ;; (or (> (car ret)(car date-time))
+ ;; (and (= (car ret)(car date-time))
+ ;; (>= (nth 1 ret)(nth 1 date-time))))
(setq ret
(exif-image-file-date-time-original
(car
(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