about | contact | disclaimer | home   


Vengeance is a lazy form of grief.

What breed of dog are you?

Silvia Broome: What do you do when you can’t sleep?
Tobin Keller: I stay awake.

I should not drink coffee before going to bed.

Sean Penn tells Nicole Kidman: “You think that not getting caught in a lie is the same thing as telling the truth.”

Goya: The Sleep of Reason Produces Monsters

At least I have chicken. I stopped at the Mediterranean Cafe on my way home from the department and had lunch—chicken apricot pie, with a side of rice and Greek salad. I was reading a book on paradox (Sainsbury, R.M., Paradoxes. Cambridge: Cambridge UP, 1995) and was then tapped on the shoulder; it was Roger from Der Vogelkopp. We chatted for a bit. I tried a little tea—minty, strong, sweet ... I cannot believe I had not tried it there before.

I left and encountered Di and Felecia; they recommended wheatgrass juice.

The following script is a sloppy bit of code, and there are more elegant ways to solve the problem, but it does the intended job. It was designed to take a directory of JPG images, create a separate directory of thumbnails, and then spit out HTML that one can paste into a webpage.


echo "First we check to see whether there is already a thumbnails directory."
sleep 2
if test -d "thumbnails"
          echo -n "There is a thumbnails directory already. "
          echo "For the security of your data, "
          echo "this script will exit now."
          exit 0
          echo "There is no thumbnails directory yet."
          echo "We will make one."
          mkdir thumbnails
sleep 2
echo " "

echo "Now we will produce thumbnails in the \"thumbnails\" directory."
echo "They will be 100 pixels on the longest side."
echo "This can take some time."
for i in *.jpg
     convert -resize 100x100 "$i" "thumbnails/tn_$i"
echo "The thumbnails have been created in the \"thumbnails\" directory."
echo " "

echo "We will now produce HTML code that you can copy and past into a file."
echo "It will be put into a file caled \"html.txt\"."
sleep 3
for i in thumbnails/*.jpg
     geometry=`identify $i | awk '{print $3}'`
     width=`echo "$geometry" | sed 's/[^0-9]/ /g' | awk '{print $1}'`
     height=`echo "$geometry" | sed 's/[^0-9]/ /g' | awk '{print $2}'`
     echo "<a href=\"${i#thumbnails/tn_}\"><img src=\"$i\" width=\"$width\" height=\"$height\" /></a>" | cat >> html.txt
echo " "

echo "We have produced a thumbnails directory, thumbnails, and the HTML "
echo "necessary to create a photo gallery."

This only provides a list of links and images tags, not an actual working webpage. It furthermore does not provide an alt attribute for each image, but that could be added. It could take commandline options or be made interactive, perhaps producing the actual HTML file (merging a header and footer, for example), but it is a start.

A few ways in which the U.S. is a very screwed up society / set-of-cultures are as follows:

Arnold Schwarzenegger Bobblehead Doll

—June 9 2005