Splasm Software Discussions https://splasm.com/forum/ |
|
AppleScript: iTunes selection to Audiobook Builder project https://splasm.com/forum/viewtopic.php?f=14&t=659 |
Page 1 of 1 |
Author: | thorix [ Thu Dec 04, 2008 11:16 am ] | ||||
Post subject: | AppleScript: iTunes selection to Audiobook Builder project | ||||
The first step for batching is done: annoyed by the lot of copy&paste work still to do I wrote an AppleScript to create an ABB project including cover artwork from an iTunes selection. Blog article: AppleScript: Create Audiobook Builder project from iTunes selection Direct download link Installation: Copy into ~/Library/iTunes/Scripts - create folders if necessary. Warning:
|
Author: | thorix [ Sun Dec 07, 2008 3:03 am ] |
Post subject: | Re: AppleScript: iTunes selection to Audiobook Builder project |
A batch mode mod: Replace the main program, the first “tell application "iTunes"” block with this (or download directly): Code: tell application "iTunes" if selection is not {} then set theSelection to selection set theAlbumTitle to the album of (item 1 of theSelection) set theAlbum to {} repeat with eachTrack in theSelection if theAlbumTitle is equal to the album of eachTrack then copy eachTrack to the end of theAlbum else -- new Album: create the project set theProject to my abbCreateProject(theAlbum) set theAlbumTitle to the album of eachTrack set theAlbum to {eachTrack} end if end repeat set theProject to my abbCreateProject(theAlbum) -- the last one -- set theProject to my abbCreateProject(theSelection) tell application "Finder" activate reveal (POSIX file theProject) as alias end tell else display dialog "Select some tracks first..." buttons {"Cancel"} default button 1 with icon 2 giving up after 15 end if end tell This code scans a track list (sorted by ‘Album’) and creates an ABB project for each encountered album. Be careful, though, it’s not tested under every condition |
Author: | Deepwinter [ Wed Aug 25, 2010 8:41 am ] |
Post subject: | Re: AppleScript: iTunes selection to Audiobook Builder proje |
I tried this script but got the following error message Couldn't create/complete project bundle "/users/garry/Music/ Audiobook Builder/The Amber Spyglass.abbuilder" (File exists?) - Don't use it! Any ideas,i dont know anything about applescript so i wouldn't know where to start but would really appreciate any help |
Author: | thorix [ Wed Aug 25, 2010 11:30 am ] |
Post subject: | Re: AppleScript: iTunes selection to Audiobook Builder proje |
Deepwinter wrote: I tried this script but got the following error message Couldn't create/complete project bundle "/users/garry/Music/ Audiobook Builder/The Amber Spyglass.abbuilder" (File exists?) - Don't use it! Any ideas,i dont know anything about applescript so i wouldn't know where to start but would really appreciate any help Let’s look at the script: Code: set cmd1 to "mkdir " & quoted form of (projectPath) set cmd2 to "mkdir " & quoted form of (projectPath & "/Files") set cmd3 to "mkdir " & quoted form of (projectPath & "/Images") try do shell script cmd1 do shell script cmd2 do shell script cmd3 on error display dialog "Couldn’t create/complete project bundle “" & projectPath & "” (File exists?) - Don’t use it!" buttons {"Cancel"} default button 1 with icon 2 giving up after 15 error number -128 end try e This means an error occurs with Shell’s mkdir creating a directory which already exists. I think you have a “The Amber Spyglass.abbuilder” bundle in your destination folder, so delete it first. Then the script should work. (These days my son and I are listening to „Das Bernsteinteleskop“, which is my localized version of the Amber Spyglass ) |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |