(iphoto-dir-format-time-range-as-album-dir): Use
authortomo <tomo>
Thu, 6 Nov 2008 13:46:49 +0000 (13:46 +0000)
committertomo <tomo>
Thu, 6 Nov 2008 13:46:49 +0000 (13:46 +0000)
<dd>h<dd>m<dd>s-<dd>h<dd>m<dd>s instead of
<dd>-<dd>-<dd>_<dd>-<dd>-<dd>.
(iphoto-dir-to-album-dir): Modify for <dd>h<dd>m<dd>s-<dd>h<dd>m<dd>s.

iphoto-util.el

index dcac895..27d9ed3 100644 (file)
 (defun iphoto-dir-format-time-range-as-album-dir (range year month day)
   (let ((time-min (decode-time (car range)))
        (time-max (decode-time (cdr range))))
-    (format "%s_%s"
+    (format "%s-%s"
            (if (and (= (nth 3 time-min) day)
                     (= (nth 4 time-min) month)
                     (= (nth 5 time-min) year))
-               (format "%02d-%02d-%02d"
+               (format "%02dh%02dm%02ds"
                        (nth 2 time-min)
                        (nth 1 time-min)
                        (nth 0 time-min))
-             (format "%d-%02d-%02d-%02d-%02d-%02d"
+             (format "%d-%02d-%02d-%02dh%02dm%02ds"
                      (nth 5 time-min)
                      (nth 4 time-min)
                      (nth 3 time-min)
            (if (and (= (nth 3 time-max) day)
                     (= (nth 4 time-max) month)
                     (= (nth 5 time-max) year))
-               (format "%02d-%02d-%02d"
+               (format "%02dh%02dm%02ds"
                        (nth 2 time-max)
                        (nth 1 time-max)
                        (nth 0 time-max))
-             (format "%d-%02d-%02d-%02d-%02d-%02d"
+             (format "%d-%02d-%02d-%02dh%02dm%02ds"
                      (nth 5 time-max)
                      (nth 4 time-max)
                      (nth 3 time-max)
                                   (mapconcat
                                    (lambda (time)
                                      (mapconcat #'identity
-                                                (split-string time "-")
+                                                (nbutlast
+                                                 (split-string time "[hms]"))
                                                 ":"))
-                                   (split-string a-dir-n "_")
+                                   (split-string a-dir-n "-")
                                    "\e$B!A\e(B")))
                      ;; (cons 'files
                      ;;       (directory-files dir nil nil nil t))