Managing Files
UPDATED: PDF Adder v4.0
Some smart-guy at Apple thought to include an alias to the iTunes.app in the /Library/PDF Services folder to make it easy to add PDFs to iTunes from the Print Dialog. But then if you want to add tags to the PDF you have to go into iTunes, dig up the track and do a Get Info.
Regular visitors will already be aware of the "Add as PDF to iTunes" PDF Service that is part of my three-script PDF Adder collection. I've just updated these as Cocoa-AppleScripts (for OS X 10.6 and 10.7 only).
These three AppleScripts assist with adding PDF files to iTunes as "digital booklet" PDF tracks. Each provides a method for easily supplying Author (artist), Album, Category (genre), Year, Rating and Description tag data which is then applied to the newly-added PDF track:
- Add as PDF to iTunes is a PDF Service workflow that, when installed, will be available in the PDF pop-up menu of the Print Dialog. It allows you to save the current document as a PDF file (from any application that uses the Print Dialog) and add it to iTunes. I describe here how I use it with Safari Reader.
- PDF Adder is an applet that will let you choose an existing PDF file and add it to iTunes. It can be installed in iTunes' Scripts folder for easy access from iTunes Script menu.
- PDF Dropper is a droplet that lets you add a PDF file to iTunes by drag-and-drop.
PDFs added to iTunes with these scripts will appear in the "Books" library and can sync with the iBooks app on iPhone or iPad.
UPDATED: Convert and Export v2.0
Convert and Export v2.0 converts the files of the selected tracks in iTunes using an encoder of your choice on-the-fly (restoring your Preferences-set encoder afterwards). The newly converted files are then moved to a new location of your choice, and their tracks removed from iTunes.
This latest version is updated to be compatible with OS X 10.7.
UPDATED: Drop to Add and Give Info v2.0
Drop to Add and Give Info v2.0 is a Cocoa-AppleScript Droplet. Drag audio files to its icon in the Finder (or Finder bar) and a multi-edit window will allow you to set many common tags before the script adds the files to iTunes, after which your tag info will be applied to the new tracks. Saves trips to iTunes when batch-adding files. Additionally, tracks can be copied to a new or existing playlist.
For OS X 10.6 or 10.7 only. The previous universal version is available via direct download at the script's entry page.
Bevy of Updates
I've just updated the last batch of scripts most recently posted to account for iTunes' full-screen mode in Lion. My good friend Kirk McElhearn is a devoted iTunes-in-full-screen-mode user and he describes the situation so elegantly that you might as well read about it at his site.
The latest scripts re-posted with quick updates are: Super Remove Dead Tracks v3.1, Remove n Characters From Front or Back v4.1, Save Album Art to Album Folder v4.1, Save Album Art as folder.jpg v2.1, and Re-Apply Downsized Artwork v2.1.
So, if you picked any of those up in the past couple of days, you may want to re-up to the latest versions.
NEW: Drop to Add and Give Info
I often have to add files to iTunes that I've received as mail, iChat, or Skype attachments or from other disparate sources. They're usually audio files that friends or colleagues have generated and aren't necessarily song files. They usually don't have any ID3 Tag info other than the file name/track name. I just drag 'em to iTunes, select a batch after they're added and multi-edit their tags. But somehow this workflow doesn't feel right to me. If I were ripping a CD, I'd enter the tags in the CD tracks before importing. Likewise, when I use PDF Adder I'm obliged to enter any tag info first.
But when I'm importing the files from the Finder I can only edit the tag info after the files are added. Thus, I have to find them in iTunes, select them, press Command-I to get the multi-edit window, and then I can start tag editing. Doesn't feel right.
So I put together a droplet called Drop to Add and Give Info that launches a GUI for multi-editing after you drop files on it but before the files are added to iTunes:
All Those Audio Formats
Via Lifehacker, this How-To Geek article is a great primer on the differences among digital audio formats.
Get a Track Reference from a File Path
Correspondent Wayne B. recently wondered if there is a way to get a reference to a track in iTunes based on its file path. Well, unfortunately, you can't do something like this:
tell application "iTunes" set trackRef to (get some file track of library playlist 1 whose location is "some/file/path.ext") end tell
That will generate an error. But you can trick iTunes into giving you the track reference by using the add command--if you are certain the file is already in iTunes' database. When you add the file iTunes will check its database for the the corresponding library track for you and if it exists will give up the reference--and it won't re-add it:
set theFile to choose file -- or however you get the file path tell application "iTunes" try set trackRef to (add theFile as alias) tell trackRef log (get name) # and so on... end tell end try end tell
But remember that if the file isn't already in iTunes' database then iTunes will add the file as a matter of course, which may not be what you want. So this trick may work best only when you know a file is currently in your library.
You will not want to use the open command instead of add, because open will compel iTunes to play the file in addition to any add-housekeeping.
UPDATED: PDF Adder v3.2
PDF Adder v3.2 is a collection of three scripts (an applet, a droplet and a PDF Services workflow) that assist with adding and tagging PDFs in iTunes.
The latest version includes fixes to all three scripts, including a cancel loop bug and a misnamed bundle. I've also added Description to the tags you can apply. This is the PDF Services script in action, activated from the PDF popup in the Print Dialog:
I've written before on how the "Add as PDF to iTunes" workflow works great with Safari Reader and NetNewsWire.
UPDATED: Re-Locate Selected v1.2
Re-Locate Selected v1.2 really fixes the version check error at launch. With the hullaballoo over the weekend concerning the latest version of iTunes, I hurriedly posted v1.1 yesterday which did not completely resolve the issue.
NEW: Re-Locate Selected
Re-Locate Selected will re-locate the files of the selected iTunes tracks from their current location to a new user-chosen folder. iTunes will be updated with each track's new location and all of each track's meta-data will be preserved. There's also an option to remove the files from their original location.