I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / MISC Areas / Mattel JuiceBox
Picture converter shell script
Works on OSX (I use Tiger) and with a few changes would work for Linux too.

New MessagePicture converter shell script (modified 0 times) xfactor69
Profile
I have hacked up a script to convert jpegs for the JuiceBox.
It requires that you have ImageMagick installed as it uses the convert command.
You will also need a copy of the 24to12.pl script.

I wrote this to convert files that are exported from iPhoto on my powerbook, hence the capital letters in the JPG file extension.

It converts a whole directory of any size files, copies them to your SD cartridge and cleans up after itself.
When it is finished it unmounts the cart so you can yank it and stick it in your JB.

This forum kills the indentation so you'll have to add that back in again.

Enjoy,
ml

#! /bin/sh
for thefile in *.JPG ; do
FILE=`echo $thefile | cut -d. -f 1 -`
if [ -r $FILE.jbp ] ; then
echo "Converted file found, no need to convert this one."
else
echo "Converting $thefile"
convert -size 240x160 $thefile -resize 240x160! rgb:$FILE.rgb
24to12.pl $FILE.rgb $FILE.jbp
rm $FILE.rgb
fi
done
volume=`disktool -l | grep msdos | cut -d\' -f 2 -`
name=`disktool -l | grep msdos | cut -d\' -f 4 - | cut -d/ -f 3 -`
if [ $volume ] && [ $name ]; then
echo "located volume $volume" with name $name
mv *.jbp /Volumes/$name
disktool -e $volume
else
echo "Can't find memory card, insert card and run this again!"
exit 1
fi


Good judgement comes from experience. . .
Experience comes from bad judgement.
06-21-2005 19:55:10

New MessageRE:Picture converter shell script (modified 0 times) ltr81211
Profile
Thanks a lot for this, was just about to dust off my textbooks.

I had to escape the "." in the FILE variable to get it to work here:

FILE=`echo $thefile | cut -d\. -f 1 -`

thanks again


-john
06-22-2005 00:47:35

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3