Friday, June 23, 2006

Batch Conversion of PNGs to PDFs

Some quick shell scripts (sh and csh) to convert all the PNG files in a directory to PDF files. The command for conversion was found on Mac OS X Hints. The difference between the two is how variables are set and the loop syntax.

#!/bin/sh
#
# Convert png files to PDFs. Command found on OS X Hints
# http://www.macosxhints.com/article.php?story=20040402201110611
#
# /usr/bin/sips -s format pdf file.png -o file.pdf


# output directory (should create)
odir=./PDFs

for file in *.png
do
echo "Converting $file"

# check basename
#echo `basename -a -s .png $file`

# convert file using basename
base=`basename -a -s .png $file`
/usr/bin/sips -s format pdf $file -o $odir/$base.pdf
done



#!/bin/csh
#
# Convert png files to PDFs. Command found on OS X Hints
# http://www.macosxhints.com/article.php?story=20040402201110611
#
# /usr/bin/sips -s format pdf file.png -o file.pdf

# output directory (should create)
set odir = ./PDFs

foreach file (`ls *.png`)
echo "Converting $file"

# check basename
#echo `basename -a -s .png $file`

# convert file using basename
set base = `basename -a -s .png $file`
/usr/bin/sips -s format pdf $file -o $odir/$base.pdf
end

Tuesday, June 06, 2006

More TLAs

Most of the work I've been doing recently has been filled with TLAs (three letter acronyms). Here are some of them (in alphabetical order):
  • ABI Application Binary Interface
  • API Application Programmer Interface
  • HDF Hierarchical Data Format the latest format is HDF5
  • IDE Integrated Development Environment
  • KDE K Desktop Environment
    KDE is a powerful Free Software graphical desktop environment for Linux and Unix workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of the Unix operating system.
  • Qt Graphical User Interface (GUI) library
  • Tcl Tool Command Language
  • VTK The Visualization Toolkit

KDE has a cool mascot....

Monday, June 05, 2006

Sara

Here are a couple of pictures of little Sara, our newest granddaughter. Sara was born two months early and through a lot of prayer and technology she is doing very well---all of us are very thankful for this little girl. She also holds the distinction of being the very first baby I have held (days after my 49th birthday).


Did I mention that she was small (about a month after birth)?


Grandma's favorite picture (for now).