From: tomo Date: Thu, 21 Apr 2005 15:10:19 +0000 (+0000) Subject: (album-write-html): Change order of argument. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c4a71d937d0d937d921b1b5a77b067b241cd94b;p=elisp%2Falbum.git (album-write-html): Change order of argument. (album-convert-image): Likewise; add QVGA grade. (album-convert-images): Change order of argument; don't use &rest for `source-images'; change arguments `image-url-prefix', `html-dest-dir' and `lang' to optional; add new optional arguments `title' and `parent-url'. (album-make-thumbnails): Change order of argument; add new optional arguments `title' and `parent-url'. (album-convert-directory): Change order of argument; use &optional instead of &rest for `patterns'; change arguments `image-url-prefix', `html-dest-dir' and `lang' to optional; add new optional arguments `title' and `parent-url'. --- diff --git a/album.el b/album.el index 4ab34eb..caa2201 100644 --- a/album.el +++ b/album.el @@ -41,9 +41,10 @@ (/ (* width percent) 100.0) (/ (* height percent) 100.0))))) -(defun album-write-html (dest-dir lang image-url-prefix +(defun album-write-html (dest-dir prev-file file next-file - prev-grade grade next-grade) + prev-grade grade next-grade + lang image-url-prefix) (with-temp-buffer (insert "\n") (insert "\n") - (insert (format "%s\n" album)) + (insert (format "%s\n" title)) (insert "\n") (insert "\n") - (insert (format "

%s

\n" album)) + (insert (format "

%s

\n" title)) (insert "
@@ -298,16 +307,22 @@ (insert "
+") + (if parent-url + (insert (format "[Return]\n" parent-url))) + (insert " ") (write-region (point-min)(point-max) (expand-file-name "index.html" html-dest-dir))))) -(defun album-convert-directory (image-dest-dir html-dest-dir lang - image-url-prefix - source-dir &rest patterns) +(defun album-convert-directory (image-dest-dir source-dir + &optional + patterns + lang title parent-url + image-url-prefix html-dest-dir) (let (files) (if patterns (dolist (pat patterns) @@ -318,9 +333,10 @@ (let (case-fold-search) (directory-files source-dir 'full - ".+\\.\\(tiff\\|jpg\\|JPG\\|jpeg\\|gif\\|png\\)$")))) - (album-convert-images image-dest-dir html-dest-dir lang - image-url-prefix files))) + ".+\\.\\(tiff\\|TIFF\\|jpg\\|JPG\\|jpeg\\|JPEG\\|gif\\|GIF\\|png\\|PNG\\)$")))) + (album-convert-images image-dest-dir files + lang title parent-url + image-url-prefix html-dest-dir))) (provide 'album)