Skip to content

macOS Apps

Articles about OS X applications.

Find and fix non-searchable PDFs

I use a ScanSnap ix500 scanner to scan a lot of paper into PDFs on my iMac. And thanks to the ScanSnap's bundled optical character recognition (OCR), all of those scans are searchable via Spotlight. While the OCR may not be perfect, it's generally more than good enough to find what I'm looking for.

However, I noticed that I had a number of PDFs that weren't searchable—some electronic statements from credit cards and utility companies, and some older documents that predated my purchase of the ScanSnap, at least based on some tests with Spotlight.

But I wanted to know how many such PDFs I had, so I could run OCR on all of them, via the excellent PDFPen Pro app. (The Fujitsu's software will only perform OCR on documents it scanned.) The question was how to find all such files, and then once found, how to most easily run them through PDFPen Pro's OCR process.

In the end, I needed to install one set of Unix tools, and then write two small scripts—one shell script and one AppleScript. Of course, you'll also need PDFPen (I don't think Pro is required), or some other app that can perform OCR on PDF files.

[continue reading…]



View app-specific log messages in Terminal

March 29 2018 Update:

When this tip was first posted, it didn't work right: The log command ignored the --start, --end, and --last parameters. Regardless of what you listed for parameters, you'd always get the entire contents of the log file. I'm happy to note that this has been resolved in macOS 10.13.4, as log now functions as expected:

$ log show --last 20s --predicate 'processImagePath CONTAINS[c] "Twitter"'
Filtering the log data using "processImagePath CONTAINS[c] "Twitter""
Skipping info and debug messages, pass --info and/or --debug to include.
Timestamp                       Thread     Type        Activity             PID    TTL  
2018-03-30 09:26:15.357714-0700 0xc88a8    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> now using Connection 142
2018-03-30 09:26:15.357742-0700 0xc8d7a    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> sent request, body N
2018-03-30 09:26:15.420242-0700 0xc88a8    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> received response, status 200 content K
2018-03-30 09:26:15.420406-0700 0xc8d7a    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> response ended
 --------------------------------------------------------------------------------------------------------------------
Log      - Default:          4, Info:                0, Debug:             0, Error:          0, Fault:          0
Activity - Create:           0, Transition:          0, Actions:           0
$

This makes it really easy to get just the time slice you need from the overly-long log files. You can use s for seconds, m for minutes, h for hours, and d for days as arguments to these parameters.

This article provides a nice overview on interacting with log and predicates to filter the output—there's a lot you can do to help figure out what might be causing a problem.

And now, here's the rest of the original post…

[continue reading…]



Sorting—or not—bookmarks in Safari in macOS 10.13.4

One of the unpublicized nuggets in macOS 10.13.4 is this little doozy in the release notes:

Enables sorting Safari bookmarks by name or URL by right-clicking and choosing 'Sort By…'

This has been a feature request for nearly as long as Safari has existed—Safari was released in January 2003, and I found this MacRumors forum thread from April 2003 asking how to sort bookmarks. So this feature was nearly 15 years in the making!

Sure enough, right click on an entry in your Bookmarks list, and you can sort by name or URL:

I have a junk drawer in Safari where I bookmark stuff that I might someday want. Like a real junk drawer, it gets filled pretty quickly, and sorting the entries is a great way to trim the out of date entries. But when I tried to sort my junk drawer…

…there was no such option available. Stumped for a moment, it struck me that there may be a limit on the number of entries, as that was the only difference between this folder and others. I removed half the entries, leaving 546, but still, no Sort entry in the contextual menu.

After a bunch of back-and-forth moving (which takes some time, when you move hundreds of bookmarks around), I found the limit: 450 entries.


So if you have a large folder of bookmarks in Safari that you need to sort, you'll have to split it into multiple folders, none of which can have more than 450 entries. Weird but true.



Easily delete albums in Photos

Last fall, I finally made the move from iPhoto to Photos…months later, I still find myself frustrated by many things in the Photos' user interface.

Today's aggravation dealt with cleaning up a bunch of older photo albums—some I just wanted to delete, others I wanted to convert from Smart Albums into normal albums (because I wouldn't be adding any more photos that used the keywords in the Smart Album). That meant I wanted to delete a bunch of albums—well over 100.

Deleting an album in Photos can only be done from either the My Albums overview, where you can select more than one (though not across folders), or via the contextual menu in the sidebar.

The My Albums view wasn't going to work for me, as I needed to look at and work with many of the albums, across many folders. But after the sixth time of doing the "right click, select Delete Album, tab to Delete in the confirmation dialog, press Return" dance, I was sick of it. Time for another Keyboard Maestro macro.

This one is very simple—it just replicates the actions required to delete an album. With it in place, I click on the album I wish to delete, then press Control-D. It's still more mouse interaction than I'd prefer—why can't I select albums via the keyboard?—but it's oh so much faster than using the contextual menu.

[continue reading…]



Stop Photos from showing the “What’s New” screen on every launch

A while back on Twitter, I complained about always seeing the "What's New?" screen in Photos when I launched the app…

This finally irked me enough that I went looking for an answer…and found one, on only the second entry in my search results.

As the linked answer explains, you can fix the problem by specifying that your Photos library is the System Photo Library, as seen here:

I hadn't specified that my Photos library was the actual System Photo Library, so that button was still active. Once I clicked it, the button grayed out, and on next launch, no more welcome screen!

I think you'll only run into this problem if you (1) migrated an iPhoto library, and (2) kept that iPhoto library on an external drive. In those cases, Photos doesn't set the library as the System Photo Library.

One minor annoyance down, many more to go.



Use less-than-full-day periods in Photos’ Smart Albums

Update: With the passage of time—one calendar day, in this case—I can now say that this hint is wrong. Photos does not respect partial day values. Instead, any value less than one is rounded to zero, so all you can really do is create a Smart Album that finds imports you made during the current calendar day. That is, Date Added - is in the last - 0 - days. This is what I'm using now, as it's better than one day, which actually shows two days (today and yesterday), but it's not as nice as iPhoto's Last Import album.

I've left the hint up, because it's been linked to and tweeted a few times, but it's wrong. Sorry for the lack of testing before I posted it.

[continue reading…]



An in-depth look at moving from iPhoto to Photos

As noted in prior posts, I've recently moved to Photos from iPhoto. So far, it's been a mixed experience. There are some elements of Photos I like, but as of today, those things are outweighed by the things I don't like.

I've vented on a number of the things I dislike on Twitter, but wanted to expand on both the positives and the negatives in more detail. Hence, this "one week in" review (of sorts) of Photos, from the perspective of an experienced iPhoto user.

I've also included some tips for working with and migrating to Photos for those who haven't yet made the move from iPhoto. Finally, if you're still reading, I've listed the key features I'd really like to see come to Photos in a future update.

Note that I am not a great photographer, but I do take a lot of photos—I have over 40,000 photos and a couple thousand video clips in my database. To keep things organized, I use lots of keywords and Smart Albums, so much of my feedback on Photos is concerned with those areas of the program.

First off, my time with Photos hasn't all been bad; there are some things that I really like in Photos…

[continue reading…]



Assign a photo’s Title field based on its filename in Photos

My migration from iPhoto to Photos continues, and today's snafu was my discovery that I couldn't rename files in Photos. This is something I've long done in iPhoto—not for every file, but for ones I'd like to group together using something other than Keywords.

For example, I have a collection of iOS wallpapers, for both the home and lock screens. I name each with either "H_" or "L_" as the start of the filename, which let me create this Smart Album to see them all together:

The inability to rename files isn't critical, in particular because the Title field can be used for the same functionality. But I had a problem: When I migrated, Photos created Titles for some, but not all, of my custom-named images. In particular, it missed all of the iOS wallpapers. I'm not sure if this is because these aren't photos in the traditional sense—they're edited photos I export as PNGs. But whatever the reason, I had hundreds of images that needed a Title that was equal to their Filename.

AppleScript to the rescue…this simple bit of code acts on the selection in Photos, and sets the Title equal to each image's filename.

To use this bit of code, just select the photos you'd like to modify in Photos, then run the script. You can make it a bit easier by saving the script into your user's Library > Scripts > Applications > Photos folder (create as many of those as don't exist). It will then be available in the AppleScript menu in the menu bar, assuming you've enabled that in the AppleScript Editor's preferences.

This saved me literally hours of work, copying and pasting filenames to the Title field. (I was surprised this worked, but it did—you can't change the filename, but you can select and copy it.)

April 28 2019 Update:

In the comments, Daryle W. asked about using this script when there wasn't a modified filename—he'd like to use the filename, but drop the extension. I did a quick bit of searching, and came up with the following, which seemed to work in my limited testing. Please have a good backup before trying this, as it's not nearly as well-tested as my original version.

This should work for any filename extension; I tested with JPG and HEIC and it worked fine. (I originally tried this without using a new variable, but it didn't work—I wasn't able to use the filename in the set cutPosition... line, for example.)



Gain control over Photos’ floating windows

As a recent somewhat-forced convert to Photos, I'm struggling with a number of things—more on that coming in a future post. But one of the tougher adjustments for me is that Photos uses a floating Info window, whereas iPhoto had an embedded info panel.

I keep the Info window open all the time, because I do a lot of work with keywords and location. (I also like to keep the Keywords window open, though this one was also floating in iPhoto.) I resize the iPhoto/Photos window quite often, depending on what I'm doing with other apps—sometimes I want my photos covering the screen, sometimes I don't.

In iPhoto, this isn't an issue (dark-background iPhoto GIF), as the info panel is attached to the main window. In Photos, though, resizing the main window leaves the Info window floating in space (light background Photos GIF).

I don't like the big gap, either visually or operationally, so I wind up moving the Info window next to the newly-resized main window.

There are a few solutions to this problem, the best of which only Apple could provide. They could make the Info window a panel below the photos, or they could make it magnetic so that it would stick to the edge of the Photos window, even as it resizes. I don't suspect we'll see either solution coming from Apple, though.

Instead of waiting for Apple, I used one of Many Tricks' own apps, Moom, which (among its other tricks) has the ability to save window layouts, either within an app or across many apps.

[continue reading…]



Create ‘and/or’ Smart Playlists in Photos

I've recently—begrudgingly, forcibly—migrated from iPhoto to Photos. My iPhone 8 Plus was the main impetus, as Photos supports its new movie and image formats, as well as providing some additional editing features that I can't get in iPhoto. But in my limited time with the new app, my general conclusion is that Photos is not designed for someone who likes to actively manage their photo collection.

I may have more to say about this in a future post, but for now, consider this style of Smart Playlist that I used a lot in iPhoto…

This structure effectively creates an "and and or" logic, where you can have all conditions must be true at the top, yet have an "or" on the keyword: This playlist finds media that have the keyword Midnight or Moonlight (our cats), and are videos.

You simply cannot build this structure in Photos, because the Keyword field is a tokenized pop-up; you can only select one value. If I list the keywords as separate criteria, I wind up with a Smart Playlist that only finds videos with both Moonlight and Midnight. That's not what I want.

This structure is useful whenever you have multiple individual things—kids, lets say—and you want a smart playlist that will find any of your children and any other criteria, like year or camera or whatever.

My first thought at a workaround was to create a Smart Playlist called The Cats, which simply had the two Keywords as "or" criteria. I'd then create a second Smart Playlist that had one criteria set to "Playlist is The Cats" and the other set to find only videos. But Photos won't let you use a Smart Playlist as a criteria (neither will iPhoto, for that matter).

After some fiddling, I came up with an ugly but functional solution: I have to use an extra keyword. Now, any time I add photos of either cat, I have to set two keywords: One with the cat's name, and the other is The Cats. With two keywords on every cat photo, I can use this Smart Playlist to make my "video of either or both cats" Smart Playlist:

I'll have to do the same for our children; each picture of Erica or Kylie will also get a The Kids keyword. It really shouldn't be this hard; Smart Playlists should work as do Finder searches…

Perhaps in Photos 4…or 5…or 6. Sigh.