Mercurial > emacs
comparison lisp/tumme.el @ 72501:645850634432
Remove * in defcustoms's docstrings.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 24 Aug 2006 18:45:29 +0000 |
parents | b5439b7a1ef1 |
children | 2292818dab8e 6823a91487f2 |
comparison
equal
deleted
inserted
replaced
72500:35e43fe3d8ef | 72501:645850634432 |
---|---|
170 "Use dired to browse your images as thumbnails, and more." | 170 "Use dired to browse your images as thumbnails, and more." |
171 :prefix "tumme-" | 171 :prefix "tumme-" |
172 :group 'multimedia) | 172 :group 'multimedia) |
173 | 173 |
174 (defcustom tumme-dir "~/.emacs.d/tumme/" | 174 (defcustom tumme-dir "~/.emacs.d/tumme/" |
175 "*Directory where thumbnail images are stored." | 175 "Directory where thumbnail images are stored." |
176 :type 'string | 176 :type 'string |
177 :group 'tumme) | 177 :group 'tumme) |
178 | 178 |
179 (defcustom tumme-thumbnail-storage 'use-tumme-dir | 179 (defcustom tumme-thumbnail-storage 'use-tumme-dir |
180 "*How to store tumme's thumbnail files. | 180 "How to store tumme's thumbnail files. |
181 Tumme can store thumbnail files in one of two ways and this is | 181 Tumme can store thumbnail files in one of two ways and this is |
182 controlled by this variable. \"Use tumme dir\" means that the | 182 controlled by this variable. \"Use tumme dir\" means that the |
183 thumbnails are stored in a central directory. \"Per directory\" | 183 thumbnails are stored in a central directory. \"Per directory\" |
184 means that each thumbnail is stored in a subdirectory called | 184 means that each thumbnail is stored in a subdirectory called |
185 \".tumme\" in the same directory where the image file is. | 185 \".tumme\" in the same directory where the image file is. |
191 (const :tag "Use tumme-dir" use-tumme-dir) | 191 (const :tag "Use tumme-dir" use-tumme-dir) |
192 (const :tag "Per-directory" per-directory)) | 192 (const :tag "Per-directory" per-directory)) |
193 :group 'tumme) | 193 :group 'tumme) |
194 | 194 |
195 (defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db" | 195 (defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db" |
196 "*Database file where file names and their associated tags are stored." | 196 "Database file where file names and their associated tags are stored." |
197 :type 'string | 197 :type 'string |
198 :group 'tumme) | 198 :group 'tumme) |
199 | 199 |
200 (defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp" | 200 (defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp" |
201 "*Name of temporary image file used by various commands." | 201 "Name of temporary image file used by various commands." |
202 :type 'string | 202 :type 'string |
203 :group 'tumme) | 203 :group 'tumme) |
204 | 204 |
205 (defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery" | 205 (defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery" |
206 "*Directory to store generated gallery html pages. | 206 "Directory to store generated gallery html pages. |
207 This path needs to be \"shared\" to the public so that it can access | 207 This path needs to be \"shared\" to the public so that it can access |
208 the index.html page that tumme creates." | 208 the index.html page that tumme creates." |
209 :type 'string | 209 :type 'string |
210 :group 'tumme) | 210 :group 'tumme) |
211 | 211 |
212 (defcustom tumme-gallery-image-root-url | 212 (defcustom tumme-gallery-image-root-url |
213 "http://your.own.server/tummepics" | 213 "http://your.own.server/tummepics" |
214 "*URL where the full size images are to be found. | 214 "URL where the full size images are to be found. |
215 Note that this path has to be configured in your web server. Tumme | 215 Note that this path has to be configured in your web server. Tumme |
216 expects to find pictures in this directory." | 216 expects to find pictures in this directory." |
217 :type 'string | 217 :type 'string |
218 :group 'tumme) | 218 :group 'tumme) |
219 | 219 |
220 (defcustom tumme-gallery-thumb-image-root-url | 220 (defcustom tumme-gallery-thumb-image-root-url |
221 "http://your.own.server/tummethumbs" | 221 "http://your.own.server/tummethumbs" |
222 "*URL where the thumbnail images are to be found. | 222 "URL where the thumbnail images are to be found. |
223 Note that this path has to be configured in your web server. Tumme | 223 Note that this path has to be configured in your web server. Tumme |
224 expects to find pictures in this directory." | 224 expects to find pictures in this directory." |
225 :type 'string | 225 :type 'string |
226 :group 'tumme) | 226 :group 'tumme) |
227 | 227 |
228 (defcustom tumme-cmd-create-thumbnail-program | 228 (defcustom tumme-cmd-create-thumbnail-program |
229 "convert" | 229 "convert" |
230 "*Executable used to create thumbnail. | 230 "Executable used to create thumbnail. |
231 Used together with `tumme-cmd-create-thumbnail-options'." | 231 Used together with `tumme-cmd-create-thumbnail-options'." |
232 :type 'string | 232 :type 'string |
233 :group 'tumme) | 233 :group 'tumme) |
234 | 234 |
235 (defcustom tumme-cmd-create-thumbnail-options | 235 (defcustom tumme-cmd-create-thumbnail-options |
236 "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" | 236 "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
237 "*Format of command used to create thumbnail image. | 237 "Format of command used to create thumbnail image. |
238 Available options are %p which is replaced by | 238 Available options are %p which is replaced by |
239 `tumme-cmd-create-thumbnail-program', %w which is replaced by | 239 `tumme-cmd-create-thumbnail-program', %w which is replaced by |
240 `tumme-thumb-width', %h which is replaced by `tumme-thumb-height', | 240 `tumme-thumb-width', %h which is replaced by `tumme-thumb-height', |
241 %f which is replaced by the file name of the original image and %t | 241 %f which is replaced by the file name of the original image and %t |
242 which is replaced by the file name of the thumbnail file." | 242 which is replaced by the file name of the thumbnail file." |
243 :type 'string | 243 :type 'string |
244 :group 'tumme) | 244 :group 'tumme) |
245 | 245 |
246 (defcustom tumme-cmd-create-temp-image-program | 246 (defcustom tumme-cmd-create-temp-image-program |
247 "convert" | 247 "convert" |
248 "*Executable used to create temporary image. | 248 "Executable used to create temporary image. |
249 Used together with `tumme-cmd-create-temp-image-options'." | 249 Used together with `tumme-cmd-create-temp-image-options'." |
250 :type 'string | 250 :type 'string |
251 :group 'tumme) | 251 :group 'tumme) |
252 | 252 |
253 (defcustom tumme-cmd-create-temp-image-options | 253 (defcustom tumme-cmd-create-temp-image-options |
254 "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" | 254 "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
255 "*Format of command used to create temporary image for display window. | 255 "Format of command used to create temporary image for display window. |
256 Available options are %p which is replaced by | 256 Available options are %p which is replaced by |
257 `tumme-cmd-create-temp-image-program', %w and %h which is replaced by | 257 `tumme-cmd-create-temp-image-program', %w and %h which is replaced by |
258 the calculated max size for width and height in the image display window, | 258 the calculated max size for width and height in the image display window, |
259 %f which is replaced by the file name of the original image and %t which | 259 %f which is replaced by the file name of the original image and %t which |
260 is replaced by the file name of the temporary file." | 260 is replaced by the file name of the temporary file." |
261 :type 'string | 261 :type 'string |
262 :group 'tumme) | 262 :group 'tumme) |
263 | 263 |
264 (defcustom tumme-cmd-pngnq-program (executable-find "pngnq") | 264 (defcustom tumme-cmd-pngnq-program (executable-find "pngnq") |
265 "*The file name of the `pngnq' program. | 265 "The file name of the `pngnq' program. |
266 It quantizes colors of PNG images down to 256 colors." | 266 It quantizes colors of PNG images down to 256 colors." |
267 :type '(choice (const :tag "Not Set" nil) string) | 267 :type '(choice (const :tag "Not Set" nil) string) |
268 :group 'tumme) | 268 :group 'tumme) |
269 | 269 |
270 (defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush") | 270 (defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush") |
271 "*The file name of the `pngcrush' program. | 271 "The file name of the `pngcrush' program. |
272 It optimizes the compression of PNG images. Also it adds PNG textual chunks | 272 It optimizes the compression of PNG images. Also it adds PNG textual chunks |
273 with the information required by the Thumbnail Managing Standard." | 273 with the information required by the Thumbnail Managing Standard." |
274 :type '(choice (const :tag "Not Set" nil) string) | 274 :type '(choice (const :tag "Not Set" nil) string) |
275 :group 'tumme) | 275 :group 'tumme) |
276 | 276 |
303 "-text b \"Thumb::MTime\" \"%m\" " | 303 "-text b \"Thumb::MTime\" \"%m\" " |
304 ;; "-text b \"Thumb::Size\" \"%b\" " | 304 ;; "-text b \"Thumb::Size\" \"%b\" " |
305 "-text b \"Thumb::URI\" \"file://%f\" " | 305 "-text b \"Thumb::URI\" \"file://%f\" " |
306 "%q %t" | 306 "%q %t" |
307 " ; rm %q"))) | 307 " ; rm %q"))) |
308 "*Command to create thumbnails according to the Thumbnail Managing Standard." | 308 "Command to create thumbnails according to the Thumbnail Managing Standard." |
309 :type 'string | 309 :type 'string |
310 :group 'tumme) | 310 :group 'tumme) |
311 | 311 |
312 (defcustom tumme-cmd-rotate-thumbnail-program | 312 (defcustom tumme-cmd-rotate-thumbnail-program |
313 "mogrify" | 313 "mogrify" |
314 "*Executable used to rotate thumbnail. | 314 "Executable used to rotate thumbnail. |
315 Used together with `tumme-cmd-rotate-thumbnail-options'." | 315 Used together with `tumme-cmd-rotate-thumbnail-options'." |
316 :type 'string | 316 :type 'string |
317 :group 'tumme) | 317 :group 'tumme) |
318 | 318 |
319 (defcustom tumme-cmd-rotate-thumbnail-options | 319 (defcustom tumme-cmd-rotate-thumbnail-options |
320 "%p -rotate %d \"%t\"" | 320 "%p -rotate %d \"%t\"" |
321 "*Format of command used to rotate thumbnail image. | 321 "Format of command used to rotate thumbnail image. |
322 Available options are %p which is replaced by | 322 Available options are %p which is replaced by |
323 `tumme-cmd-rotate-thumbnail-program', %d which is replaced by the | 323 `tumme-cmd-rotate-thumbnail-program', %d which is replaced by the |
324 number of (positive) degrees to rotate the image, normally 90 or 270 | 324 number of (positive) degrees to rotate the image, normally 90 or 270 |
325 \(for 90 degrees right and left), %t which is replaced by the file name | 325 \(for 90 degrees right and left), %t which is replaced by the file name |
326 of the thumbnail file." | 326 of the thumbnail file." |
327 :type 'string | 327 :type 'string |
328 :group 'tumme) | 328 :group 'tumme) |
329 | 329 |
330 (defcustom tumme-cmd-rotate-original-program | 330 (defcustom tumme-cmd-rotate-original-program |
331 "jpegtran" | 331 "jpegtran" |
332 "*Executable used to rotate original image. | 332 "Executable used to rotate original image. |
333 Used together with `tumme-cmd-rotate-original-options'." | 333 Used together with `tumme-cmd-rotate-original-options'." |
334 :type 'string | 334 :type 'string |
335 :group 'tumme) | 335 :group 'tumme) |
336 | 336 |
337 (defcustom tumme-cmd-rotate-original-options | 337 (defcustom tumme-cmd-rotate-original-options |
338 "%p -rotate %d -copy all \"%o\" > %t" | 338 "%p -rotate %d -copy all \"%o\" > %t" |
339 "*Format of command used to rotate original image. | 339 "Format of command used to rotate original image. |
340 Available options are %p which is replaced by | 340 Available options are %p which is replaced by |
341 `tumme-cmd-rotate-original-program', %d which is replaced by the | 341 `tumme-cmd-rotate-original-program', %d which is replaced by the |
342 number of (positive) degrees to rotate the image, normally 90 or | 342 number of (positive) degrees to rotate the image, normally 90 or |
343 270 \(for 90 degrees right and left), %o which is replaced by the | 343 270 \(for 90 degrees right and left), %o which is replaced by the |
344 original image file name and %t which is replaced by | 344 original image file name and %t which is replaced by |
346 :type 'string | 346 :type 'string |
347 :group 'tumme) | 347 :group 'tumme) |
348 | 348 |
349 (defcustom tumme-temp-rotate-image-file | 349 (defcustom tumme-temp-rotate-image-file |
350 "~/.emacs.d/tumme/.tumme_rotate_temp" | 350 "~/.emacs.d/tumme/.tumme_rotate_temp" |
351 "*Temporary file for rotate operations." | 351 "Temporary file for rotate operations." |
352 :type 'string | 352 :type 'string |
353 :group 'tumme) | 353 :group 'tumme) |
354 | 354 |
355 (defcustom tumme-rotate-original-ask-before-overwrite t | 355 (defcustom tumme-rotate-original-ask-before-overwrite t |
356 "Confirm overwrite of original file after rotate operation. | 356 "Confirm overwrite of original file after rotate operation. |
359 :type 'boolean | 359 :type 'boolean |
360 :group 'tumme) | 360 :group 'tumme) |
361 | 361 |
362 (defcustom tumme-cmd-write-exif-data-program | 362 (defcustom tumme-cmd-write-exif-data-program |
363 "exiftool" | 363 "exiftool" |
364 "*Program used to write EXIF data to image. | 364 "Program used to write EXIF data to image. |
365 Used together with `tumme-cmd-write-exif-data-options'." | 365 Used together with `tumme-cmd-write-exif-data-options'." |
366 :type 'string | 366 :type 'string |
367 :group 'tumme) | 367 :group 'tumme) |
368 | 368 |
369 (defcustom tumme-cmd-write-exif-data-options | 369 (defcustom tumme-cmd-write-exif-data-options |
370 "%p -%t=\"%v\" \"%f\"" | 370 "%p -%t=\"%v\" \"%f\"" |
371 "*Format of command used to write EXIF data. | 371 "Format of command used to write EXIF data. |
372 Available options are %p which is replaced by | 372 Available options are %p which is replaced by |
373 `tumme-cmd-write-exif-data-program', %f which is replaced by the | 373 `tumme-cmd-write-exif-data-program', %f which is replaced by the |
374 image file name, %t which is replaced by the tag name and %v | 374 image file name, %t which is replaced by the tag name and %v |
375 which is replaced by the tag value." | 375 which is replaced by the tag value." |
376 :type 'string | 376 :type 'string |
377 :group 'tumme) | 377 :group 'tumme) |
378 | 378 |
379 (defcustom tumme-cmd-read-exif-data-program | 379 (defcustom tumme-cmd-read-exif-data-program |
380 "exiftool" | 380 "exiftool" |
381 "*Program used to read EXIF data to image. | 381 "Program used to read EXIF data to image. |
382 Used together with `tumme-cmd-read-exif-data-program-options'." | 382 Used together with `tumme-cmd-read-exif-data-program-options'." |
383 :type 'string | 383 :type 'string |
384 :group 'tumme) | 384 :group 'tumme) |
385 | 385 |
386 (defcustom tumme-cmd-read-exif-data-options | 386 (defcustom tumme-cmd-read-exif-data-options |
387 "%p -s -s -s -%t \"%f\"" | 387 "%p -s -s -s -%t \"%f\"" |
388 "*Format of command used to read EXIF data. | 388 "Format of command used to read EXIF data. |
389 Available options are %p which is replaced by | 389 Available options are %p which is replaced by |
390 `tumme-cmd-write-exif-data-options', %f which is replaced | 390 `tumme-cmd-write-exif-data-options', %f which is replaced |
391 by the image file name and %t which is replaced by the tag name." | 391 by the image file name and %t which is replaced by the tag name." |
392 :type 'string | 392 :type 'string |
393 :group 'tumme) | 393 :group 'tumme) |
394 | 394 |
395 (defcustom tumme-gallery-hidden-tags | 395 (defcustom tumme-gallery-hidden-tags |
396 (list "private" "hidden" "pending") | 396 (list "private" "hidden" "pending") |
397 "*List of \"hidden\" tags. | 397 "List of \"hidden\" tags. |
398 Used by `tumme-gallery-generate' to leave out \"hidden\" images." | 398 Used by `tumme-gallery-generate' to leave out \"hidden\" images." |
399 :type '(repeat string) | 399 :type '(repeat string) |
400 :group 'tumme) | 400 :group 'tumme) |
401 | 401 |
402 (defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100) | 402 (defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100) |
414 "Height of thumbnails, in pixels." | 414 "Height of thumbnails, in pixels." |
415 :type 'integer | 415 :type 'integer |
416 :group 'tumme) | 416 :group 'tumme) |
417 | 417 |
418 (defcustom tumme-thumb-relief 2 | 418 (defcustom tumme-thumb-relief 2 |
419 "*Size of button-like border around thumbnails." | 419 "Size of button-like border around thumbnails." |
420 :type 'integer | 420 :type 'integer |
421 :group 'tumme) | 421 :group 'tumme) |
422 | 422 |
423 (defcustom tumme-thumb-margin 2 | 423 (defcustom tumme-thumb-margin 2 |
424 "*Size of the margin around thumbnails. | 424 "Size of the margin around thumbnails. |
425 This is where you see the cursor." | 425 This is where you see the cursor." |
426 :type 'integer | 426 :type 'integer |
427 :group 'tumme) | 427 :group 'tumme) |
428 | 428 |
429 (defcustom tumme-line-up-method 'dynamic | 429 (defcustom tumme-line-up-method 'dynamic |
430 "*Default method for line-up of thumbnails in thumbnail buffer. | 430 "Default method for line-up of thumbnails in thumbnail buffer. |
431 Used by `tumme-display-thumbs' and other functions that needs to | 431 Used by `tumme-display-thumbs' and other functions that needs to |
432 line-up thumbnails. Dynamic means to use the available width of the | 432 line-up thumbnails. Dynamic means to use the available width of the |
433 window containing the thumbnail buffer, Fixed means to use | 433 window containing the thumbnail buffer, Fixed means to use |
434 `tumme-thumbs-per-row', Interactive is for asking the user, and No | 434 `tumme-thumbs-per-row', Interactive is for asking the user, and No |
435 line-up means that no automatic line-up will be done." | 435 line-up means that no automatic line-up will be done." |
439 (const :tag "Interactive" interactive) | 439 (const :tag "Interactive" interactive) |
440 (const :tag "No line-up" none)) | 440 (const :tag "No line-up" none)) |
441 :group 'tumme) | 441 :group 'tumme) |
442 | 442 |
443 (defcustom tumme-thumbs-per-row 3 | 443 (defcustom tumme-thumbs-per-row 3 |
444 "*Number of thumbnails to display per row in thumb buffer." | 444 "Number of thumbnails to display per row in thumb buffer." |
445 :type 'integer | 445 :type 'integer |
446 :group 'tumme) | 446 :group 'tumme) |
447 | 447 |
448 (defcustom tumme-display-window-width-correction 1 | 448 (defcustom tumme-display-window-width-correction 1 |
449 "*Number to be used to correct image display window width. | 449 "Number to be used to correct image display window width. |
450 Change if the default (1) does not work (i.e. if the image does not | 450 Change if the default (1) does not work (i.e. if the image does not |
451 completely fit)." | 451 completely fit)." |
452 :type 'integer | 452 :type 'integer |
453 :group 'tumme) | 453 :group 'tumme) |
454 | 454 |
455 (defcustom tumme-display-window-height-correction 0 | 455 (defcustom tumme-display-window-height-correction 0 |
456 "*Number to be used to correct image display window height. | 456 "Number to be used to correct image display window height. |
457 Change if the default (0) does not work (i.e. if the image does not | 457 Change if the default (0) does not work (i.e. if the image does not |
458 completely fit)." | 458 completely fit)." |
459 :type 'integer | 459 :type 'integer |
460 :group 'tumme) | 460 :group 'tumme) |
461 | 461 |
485 dired and you might want to turn it off." | 485 dired and you might want to turn it off." |
486 :type 'boolean | 486 :type 'boolean |
487 :group 'tumme) | 487 :group 'tumme) |
488 | 488 |
489 (defcustom tumme-display-properties-format "%b: %f (%t): %c" | 489 (defcustom tumme-display-properties-format "%b: %f (%t): %c" |
490 "*Display format for thumbnail properties. | 490 "Display format for thumbnail properties. |
491 %b is replaced with associated dired buffer name, %f with file name | 491 %b is replaced with associated dired buffer name, %f with file name |
492 \(without path) of original image file, %t with the list of tags and %c | 492 \(without path) of original image file, %t with the list of tags and %c |
493 with the comment." | 493 with the comment." |
494 :type 'string | 494 :type 'string |
495 :group 'tumme) | 495 :group 'tumme) |
498 ;; TODO: Use mailcap, dired-guess-shell-alist-default, | 498 ;; TODO: Use mailcap, dired-guess-shell-alist-default, |
499 ;; dired-view-command-alist. | 499 ;; dired-view-command-alist. |
500 (cond ((executable-find "display")) | 500 (cond ((executable-find "display")) |
501 ((executable-find "xli")) | 501 ((executable-find "xli")) |
502 ((executable-find "qiv") "qiv -t")) | 502 ((executable-find "qiv") "qiv -t")) |
503 "*Name of external viewer. | 503 "Name of external viewer. |
504 Including parameters. Used when displaying original image from | 504 Including parameters. Used when displaying original image from |
505 `tumme-thumbnail-mode'." | 505 `tumme-thumbnail-mode'." |
506 :type 'string | 506 :type 'string |
507 :group 'tumme) | 507 :group 'tumme) |
508 | 508 |
509 (defcustom tumme-main-image-directory "~/pics/" | 509 (defcustom tumme-main-image-directory "~/pics/" |
510 "*Name of main image directory, if any. | 510 "Name of main image directory, if any. |
511 Used by `tumme-copy-with-exif-file-name'." | 511 Used by `tumme-copy-with-exif-file-name'." |
512 :type 'string | 512 :type 'string |
513 :group 'tumme) | 513 :group 'tumme) |
514 | 514 |
515 (defcustom tumme-show-all-from-dir-max-files 50 | 515 (defcustom tumme-show-all-from-dir-max-files 50 |
516 "*Maximum number of files to show using `tumme-show-all-from-dir'. | 516 "Maximum number of files to show using `tumme-show-all-from-dir'. |
517 before warning the user." | 517 before warning the user." |
518 :type 'integer | 518 :type 'integer |
519 :group 'tumme) | 519 :group 'tumme) |
520 | 520 |
521 (defun tumme-dir () | 521 (defun tumme-dir () |