emacs-wiki snippet for getting a list of images from a dired buffer

| emacs
(defun sacha/emacs-wiki-marked-images-as-kill ()
  "Return a list of images ready to be inserted into a wiki page."
  (interactive)
  (kill-new (mapconcat
             'emacs-wiki-make-link
             (dired-get-marked-files)
             "\n")))

bash script for timestamping and thumbnailing pictures

#!/bin/bash
SIZE=320x240
while [ -n "$1" ]; do
  if [ -f $1 ]; then
    DATE=$(date +"%Y%m%d-%H%M%S" --reference="$1")
    EXT=$(echo "$1" | sed 's/.*\././')
    echo $1
    cp $1 "$DATE$EXT"
    cp "$DATE$EXT" "thumb-$DATE$EXT"
    touch --reference="$1" "$DATE$EXT"
    if [ "$EXT" == ".jpg" ]; then
       convert -size $SIZE -resize $SIZE "$DATE$EXT" "thumb-$DATE$EXT"
       touch --reference="$1" "thumb-$DATE$EXT"
    fi
  fi
  shift
done
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.