dougscripts.com

Books

April 19 2020 - 1:40 pm

NEW: Add PDF to Music or Books v1.0

You may be aware, or vaguely remember, that iTunes was able to manage PDF files. Sounds weird, I know. But early on, the iTunes Store provided extra album content as PDFs, so-called "digital booklets". Digital booklets went away but iTunes, and now the Music app, still support PDFs.

I got into a right regular habit of saving PDFs to iTunes. It was easy to categorize the plethora of them using the track tags that iTunes provided as a matter of course for all track entries. I've got instruction manuals, interesting news articles, notes, Wikipedia articles, VO scripts, email conversations, all kinds of stuff. When The Great Breakup happened, my PDFs were automatically moved to the Books app. That's fine, but Books doesn't allow tag editing, isn't AppleScriptable, and so on. I automatically assumed that PDF support was gone from Music, but it didn't occur to me until last week to even check.

I had created and maintained a set of scripts for managing PDFs in iTunes called PDF Adder. But the only script I regularly used from this collection was a PDF Service workflow that was accessible from the Print Dialog in any app. And so I've updated it for use with the Music app and the Books app.

Add PDF to Music or Books is an applet that must be installed in the [home]/Library/PDF Services/ folder. Once installed, it will appear as an option in the Print Dialog's PDF popup:

When selected, this panel will open and tag information can be added:

In this example, I've selected the Music app to receive the PDF. If Books had been selected, only the Title, Artist (Author) and Genre (Category) fields would be available since the Books app does not support the other tags.

More information and download for Add PDF to Music or Books is available on this page.

May 13 2012 - 9:40 am

Project: Gather Partially Played Tracks

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 checkmarked—presumably, your audiobooks are "bookmarkable" by default or you have set the "remember" option manually—a 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:

(more…)

September 29 2011 - 11:32 am

UPDATED: Make PDF Booklet v2.0

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:

Here are example PDFs using audio tracks and using TV Show tracks made with the script.

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.

August 6 2011 - 5:01 pm

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.

December 15 2010 - 3:22 pm

iBooks v1.2 Available

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.

November 29 2010 - 10:49 am

Library Benefits

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.)

November 18 2010 - 10:57 am

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.

September 16 2010 - 10:51 am

Take Your Album List WIth You

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.)

BTW: I was reminded of album list printing when I heard Kirk chatting with Chuck Joiner about his new book, Take Control of iTunes 10: The FAQ (which will also sync nicely to your iBooks app).

August 28 2010 - 10:32 am

Add Pages ePubs to iTunes Automatically for iBooks Sync

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.

August 12 2010 - 10:37 am

NEW: Search Amazon Book Covers v1.0

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.

Site contents © 2001 - 2024 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.