Bash to AppleScript? (Is this possible to do with AS?)
Bash to AppleScript? (Is this possible to do with AS?)
- Subject: Bash to AppleScript? (Is this possible to do with AS?)
- From: Scott Wilcox <email@hidden>
- Date: Fri, 21 Dec 2007 08:56:22 +0000
Greetings All,
A little while I spoke about a script I was looking at writing. I've got
the equivilent of the script running within bash and its doing a pretty
good job, but I was wondering if its possible to do something like this
with AppleScript, and whether it would be as quick/effective overall to
do so.
The bash script is as follows:
# Bash script to process iTunes artwork and then move
# new images over to webserver.
# First, clean out old path (just to make sure nothing is left there)
/usr/bin/rm -rf /tmp/albumart/*
# Now find all the new albumart .itcs
find /Users/scott/Music/iTunes/Album\ Artwork/ -name *itc* -exec
/usr/bin/java jpegextractor -D /tmp/albumart -d 4 -q -p album {} \;
# Now, use Imagemagick to resize all the images to a
# size we'd like to use
/usr/local/ImageMagick-6.3.7/bin/mogrify -resize 100x100 /tmp/albumart/*
# Now we need to scp the albumart over to our webserver
/usr/bin/scp /tmp/albumart/* www@iaso:/a/path/on/server
# Once thats finished, remove the old albumart
/usr/bin/rm -rf /tmp/albumart/*
Also SCP requires a password being entered with no method of caching,
this is a bit of a pain, without setting up keys not avoidable -
anything applescript side that can help here?
Any help/information is most, most welcome. :)
PS: If you're curious as to what this does, it takes the iTunes .itc
files which contain a data and jpeg stream for their
albumart/information and strips the jpeg stream out, saves it to a file
and then resizes. Finally shoots off to the webserver, and you can see
it at http://nixbox.org :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden