From: tomo Date: Fri, 19 May 2006 10:35:14 +0000 (+0000) Subject: (www-image-default-base-directory): New variable. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21eec0779a2e0706602452f321561b839d8e3840;p=elisp%2Falbum.git (www-image-default-base-directory): New variable. (www-image-display-thumbnails): Get title from dir.desc; insert note feature of dir.desc; use www-image-default-base-directory. --- diff --git a/www-image.el b/www-image.el index 63695f1..bc727c8 100644 --- a/www-image.el +++ b/www-image.el @@ -32,6 +32,9 @@ 'utf-8-jp-er 'utf-8)) +(defvar www-image-default-base-directory + "../pub/pictures/") + (defvar www-image-size-specs '((thumbnail 160 160) (QVGA 320 240) @@ -66,10 +69,6 @@ (defun www-image-display-thumbnails (url-dir &optional size image-root lang title parent-url) (setq url-dir (file-name-as-directory url-dir)) - (unless title - (setq title - (file-name-nondirectory - (substring url-dir 0 (1- (length url-dir)))))) (let* ((desc-file (expand-file-name "dir.desc" (expand-file-name url-dir image-root))) @@ -79,9 +78,18 @@ (insert-file-contents desc-file) (read (current-buffer))))) source-images - file) + file + note) + (when (setq title (assq 'title params)) + (setq title (cdr title))) + (unless title + (setq title + (file-name-nondirectory + (substring url-dir 0 (1- (length url-dir)))))) (when (setq source-images (assq 'files params)) (setq source-images (cdr source-images))) + (when (setq note (assq 'note params)) + (setq note (cdr note))) (when (setq parent-url (assq 'exit params)) (setq parent-url (cdr parent-url))) (with-temp-buffer @@ -112,6 +120,11 @@ (insert (format "\"%s\"" file url-dir file)) (insert "\n")) + + (when note + (insert "

") + (insert note)) + (insert "


@@ -357,7 +370,7 @@ (setq command-line-args-left (cdr command-line-args-left)) (setq image-root (or (car command-line-args-left) (expand-file-name - "../data/photo/" + www-image-default-base-directory default-directory))) (setq command-line-args-left (cdr command-line-args-left)) (cond (file