• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bash to AppleScript? (Is this possible to do with AS?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Bash to AppleScript? (Is this possible to do with AS?)
      • From: "Mark J. Reed" <email@hidden>
    • Re: Bash to AppleScript? (Is this possible to do with AS?)
      • From: Philip Aker <email@hidden>
References: 
 >Re: How to start/restart the Finder from an AS app? (From: "Stockly, Ed" <email@hidden>)
 >Re: How to start/restart the Finder from an AS app? (From: Christopher Nebel <email@hidden>)
 >Re: How to start/restart the Finder from an AS app? (From: "Mark J. Reed" <email@hidden>)
 >Re: How to start/restart the Finder from an AS app? (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: How to start/restart the Finder from an AS app?
  • Next by Date: Re: sysv and OS X 10.4.10 and .11
  • Previous by thread: Re: How to start/restart the Finder from an AS app?
  • Next by thread: Re: Bash to AppleScript? (Is this possible to do with AS?)
  • Index(es):
    • Date
    • Thread