chiark / gitweb /
dpkg-quilt-setup: be a little more verbose
[bin.git] / skeleton-gallery
1 #! /bin/sh
2 set -e
3
4 exec >gallery.xml
5
6 cat <<EOF
7 <gallery title="" perpage=""
8          authorname="Colin Watson"
9          authoremail="cjwatson@chiark.greenend.org.uk">
10 EOF
11
12 index=0
13
14 for x in `ls *.jpg | sort -n`; do
15     index=$(($index + 1))
16     if [ "$index" -ne 1 ]; then
17         echo
18     fi
19     printf '  <photo id="%d"' "$index"
20     identify "$x" | \
21         perl -ne '/(\d+)x(\d+)/ and print qq{ width="$1" height="$2"}'
22     cat <<EOF
23 >
24     <p></p>
25   </photo>
26 EOF
27 done
28
29 cat <<EOF
30 </gallery>
31
32 <!-- vim: set tw=76 sts=2 sw=2 et: -->
33 EOF