Splasm Software Discussions

a user community for the betterment of Splasmkind
It is currently Thu Mar 28, 2024 2:31 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Dec 04, 2008 11:16 am 
Offline

Joined: Sat Feb 16, 2008 5:21 am
Posts: 8
Location: Germany
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:
    This script builds a project file which works for ABB 1.0.11. Since the project file format is owned by Splasm, there’s no guarantee for future versions of ABB.
    The script assumes you have sorted the selection (by album) and copies the artist, album and artwork from the first track of your selection. It will build a single file chapter for each selected track in order of your selection, not by file name or other criteria.
    Check each project before conversion begins, espc. when you wish to delete the source.


Attachments:
File comment: This is the zipped script itself.
abbp-0.9.zip [25.54 KiB]
Downloaded 1687 times
File comment: The generated project, name/artist/cover taken from the first selected track …
abbpCoverScreen-01.png
abbpCoverScreen-01.png [ 36.41 KiB | Viewed 23245 times ]
File comment: … with a chapter for each track regarding it’s artwork
abbpChapterScreen-01.png
abbpChapterScreen-01.png [ 35.8 KiB | Viewed 23243 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 07, 2008 3:03 am 
Offline

Joined: Sat Feb 16, 2008 5:21 am
Posts: 8
Location: Germany
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 ;-)


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 25, 2010 8:41 am 
Offline

Joined: Wed Aug 25, 2010 7:57 am
Posts: 7
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 25, 2010 11:30 am 
Offline

Joined: Sat Feb 16, 2008 5:21 am
Posts: 8
Location: Germany
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 8) )


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group


Home | Products | Support | Forum | Store | Contact | News | Privacy
Copyright © 2002- Splasm Software, Inc.