Archive for the
I got an email from Correspondent Sherwood Botsford asking if there was any way to round up his partially played audiobooks. What he wanted to do was maintain a playlist of recently added audiobook tracks that he hadn’t finished listening to and sync it to his iPhone. He’d gotten the recently added stuff okay by using a Smart Playlist. But Smart Playlists don’t include any criteria for detecting how far along a track has been played, and Last Skipped may not necessarily have been set if a track was simply stopped rather than skipped.
If a track’s “Remember playback position” setting in its Get Info’s Options tab has been checkmarkedpresumably, your audiobooks are “bookmarkable” by default or you have set the “remember” option manuallya track’s bookmark property will contain the number of seconds the track had been played before it was stopped. Thus, if any tracks have a bookmark value greater than zero then they’ve been partially played.
So here’s a script that will gather all those partially played tracks into a new playlist named “Partially Played” and that playlist can be the source for the Smart Playlist:
Make PDF Booklet v2.0 is a Cocoa-AppleScript applet that will create a PDF booklet containing tag info from the selected tracks (or every track from the selected playlist) and then add the PDF to iTunes and copy it to the playlist where the selected tracks reside.
The layout and text formatting of the document created is somewhat restricted, but I hope it is eminently readable and printable. However, you are able to choose which tag data to include for each track:
This latest version is a Cocoa-AppleScript Applet, so it can only be run on OS X 10.6 and 10.7. A previous version which can run on earlier systems is available from the Make PDF Booklet entry page.
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.
Apple has posted iBooks v1.2 for iOS devices with some cool new features including PDF and notes printing and Collections creation for books and PDFs.
A Correspondent observes that PDFs and digital booklets are no longer lodged in the “Music” library but in the “Books” library. Thus he laments that he is unable to access these books alongside the music tracks while browsing the “Music” library. While book-type tracks and music tracks can reside in the same playlist, yes, they do belong to different libraries. But creating a separate playlist for every album with a PDF or digital booklet doesn’t seem very efficient.
I used Change Hidden iTunes Preferences to toggle the visibility of the “Library” library playlist. In the pic below it is listed atop the other library playlists. In the old days, this was the main library playlist and listed everything in the library. Well, it still does. When the “Library” is available, you can use the Column Browser to access an entire Album, which will include any associated booklet (providing the Artist/Album tags correspond correctly):
(The yellow highlight over the booklet is an artistic representation.)
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.
You probably know that you can use iTunes’ Print command to create CD box labels and stuff, which I’m guessing not many people need much any more. You can also print a list of all your Albums, sorted by Artist. Big whoop? Well, instead of printing it to paper, use the PDF Service in PDF Adder to add the listing as a PDF to iTunes’ Books library. It syncs to the iBooks app on your iPhone or iPad, too, so you can keep a portable list of all your albums with you. Update it once a month or so. Mine came to thirty-two pages! (Gotta work on my iPhone Cross-Country-Ski-Fingers Speed Scroll technique.)
The latest update to Pages.app allows docs to be exported in the ePub format. ePub is one of the formats that can be read by the iBooks app. Now, in order for documents to get onto your iPhone/iPad you have to add them to iTunes. By hand? No! Automatically with a Folder Action! Below is a script which you should save to your /Library/Scripts/Folder Action Scripts folder. Attach the script as a folder action to a designated “ePub Export” folder, which you will create. Whenever you “Export…” a Pages doc to that “ePub Export” folder, it will automatically be added to iTunes’ Books library and eventually sync to your iPhone/iPad.
If your iTunes is set to “Copy files to iTunes Media folder when adding to library”, then you may want to delete the original from the “ePub Export” folder; just un-comment the (* *) section in the script by removing the (* and *) and saving the script.
on adding folder items to my_folder after receiving the_files repeat with i from 1 to number of items in the_files set this_file to (item i of the_files) tell application "Finder" if (get name extension of this_file) is not "epub" then return end tell tell application "iTunes" try add this_file (* -- if you have iTunes set to --"Copy files to iTunes Media folder when adding to library" -- then you might want to delete the original file... -- if so, remove comments from this block and -- use the UNIX commands below to delete the file do shell script ("rm -f " & quoted form of POSIX path of (this_file as text)) *) end try end tell end repeat end adding folder items to
More info on Folder Actions for iTunes is located here.
Here’s a pretty basic Search-Amazon-For-Art script. It grabs the name, artist, and genre tags from a single selected book-type track in iTunes and lets you choose which of those tags to use as keywords in a search for book cover artwork at Amazon Books. Search Amazon Book Covers currently pings the US Amazon site, but it can easily be mod’d to work with their other sites, or as the basis for a search of some other site.
In View Options for Books, the “Genre” column has been removed, and the “Artist” column appears to be renamed as “Author”. In AppleScript it looks like the “Author” is accessible as a book track’s artist. Also, FWIW, I’m not seeing my “Jeeves” ePub book in the XML.