YAPS




Dilbert to Palm script

Prerequisite Software:

diltopalm.sh

I have a script that downloads the newest dilbert and userfriendly cartoons each day. Naturally, the next step is to have them automagically appear on the palm. I use ImageMagick and pbmtoimgv to convert the images to a palm friendly (Image Viewer) format. I then use Tiny Viewer (Freeware Image Viewer compatible App) to view the cartoons.
#!/bin/csh
setenv PILROOT /usr/local/pilot/bin
setenv GIFPATH  /usr/home/gsd/dilbertgifs
setenv FILENAME  `ls -t $GIFPATH/*.gif|head -1`
setenv UFFILENAME `ls -t $GIFPATH/userfriendly/*.gif|head -1`
setenv FILEDATE `date +%Y%m%d`

#Convert the images from gif to pbm
/usr/local/bin/convert $FILENAME $FILENAME.PBM
/usr/local/bin/convert $UFFILENAME $UFFILENAME.PBM

#Then from pbm to ImageViewer format
/usr/local/bin/pbmtoimgv -t $FILEDATE\dilbert $FILENAME.PBM $FILENAME.PBM.pdb
/usr/local/bin/pbmtoimgv -t $FILEDATE\ufie $UFFILENAME.PBM $UFFILENAME.PBM.pdb

#And upload them.
$PILROOT/ppplinkdown
$PILROOT/pilot-xfer -i $FILENAME.PBM.pdb $UFFILENAME.PBM.pdb
$PILROOT/ppplinkup

rm $FILENAME.PBM $UFFILENAME.PBM
rm $FILENAME.PBM.pdb $UFFILENAME.PBM.pdb


Back to Top Page last modified: Thu Mar 1 19:08:23 GMT 2001