I have a bunch of playlists that I’ve crafted over the years and when I moved to Apple Music I was disappointed to see my local library copies of those files replaced with Apple Music’s versions. It seemed to be totally arbitrary and, importantly, the play count, rating, etc. was different on my local library copies then it was on the Apple Music versions of those songs.

UntitledImage

In the above, I know that I have a copy of Can’t get There from Here in my local library, so not sure why the Apple Music one was substituted in my playlist. Anyway, I want my local version in there so I can track stats, etc.

I poked around the venerable Doug’s Scripts for a while but couldn’t quite find what I needed so I wrote this script which:

  • Select/start playing a song in the playlist you want to work with
  • Creates a new playlist called “$playlistname Local Files.”
  • Checks each song in the active playlist to see if it’s local or Apple Music
  • If it’s not Apple Music, it just adds it to the Local Files version of the playlist
  • If it is Apple Music, it checks to see if there is a song in your library with the same Artist and Song name
  • It then copies the tracks that result from that search to the Local Files version of the playlist
  • If it can’t find a local copy, it adds the Apple Music version to the “Local Files” copy of the playlist

The search is really loose so it will find multiple local copies if you have them which is a bit of a pain in the butt. SO you need to go to the new playlist and remove the local versions (live! Remix!, etc.) from the playlist.

I’ve run this on a few big playlists with ~1000 songs and it runs just fine. It might be helpful for a few folks so I’m putting it up here but that said, I wouldn’t download and run this unless you know what the code is doing.

Over the past year I’ve been using a service called Readwise.io to surface highlights from books I read on my Kindle and from articles I read on my iPad using Instapaper.

Screen Shot 2021 06 30 at 3 46 07 PM

The service has its flaws but all in all has been useful to me in helping me to remember what I’ve read and found important.

That said, I’m finding myself less inclined to wanting to read long form journalism on my iPad, especially at night in bed when I’m trying to stay away from screens or at the beach where my Kindle feels easier to read than my iPad.

I have spent the past couple of weeks cobbling together a collection of tools that makes reading long articles on my Kindle easier as well as saves any article highlights I’ve made to Readwise.

I wish that I could use Instapaper for this workflow but, while you can read Instapaper articles on the Kindle pretty easily, tracking highlights doesn’t work so well. So I’ve landed on the following:

Push to Kindle from fivefilters allows me to easily push web articles to my kindle from my Mac (via Safari extension), iPhone or iPad (nice, easy to configure dedicated iOS app)

I then read/highlight on my Kindle paperwhite

When I plug my Kindle into my Mac’s USB connection, the highlights are automatically sent to my Readwise account

This last bit requires a good bit of AppleScript sorcery but it’s pretty easy to achieve using EventScripts.

Basically, EventScripts notices when my Kindle is plugged in. Once it sees the Kindle is plugged in, it executes this AppleScript which emails the My Clippings.txt file automatically to readwise who then imports it.

Really pretty elegant stuff here that, I hope, shows the value proposition of many small/lightweight tools loosely coupled as opposed to some monolithic solution.

Wrote up a handy little Keyboard Maestro macro that will remind me to charge my Apple Watch.

The special sauce here is that it runs any and every time I wake up my Mac between 5AM and 10:30AM.

You can download the Keyboard Maestro macro here.

[update: So, Keyboard Maestro doesn’t have a trigger for “password unlocks screensaver” And that is really when this thing needs to run. Enter the amazing EventScripts. Had no idea this tool existed but it kicks off AppleScripts for various system events (unlock screensaver, song change in iTunes, etc.). So worth the $6. Hope it continues to work once I upgrade to Big Sur!)

UntitledImage

Highlighting the truly first-world problem of Mac automation being totally different from iOS automation, I wrote up a simple AppleScript that mirrors the functionality of my iOS shortcut that takes my brain dump list out of Day One and “intelligently” transfers it to Things.

When I write my morning entry in my Day One journal I sometimes brainstorm a little todo list, and this allows me to copy it and load the todo list into Things. Moreover, it looks for the string “today” in the brain dump and puts those items in the Today list in things.

set TodayStr to "today"
set Total to 0
set listContents to get the clipboard
set delimitedList to paragraphs of listContents


tell application "Things3"
	repeat with currentTodo in delimitedList
		if currentTodo as string is not equal to "" then
			set Total to Total + 1
			if currentTodo contains TodayStr then
				set newToDo to make new to do ¬
					with properties {name:currentTodo, due date:current date} ¬
					at beginning of list "Today"
							else
				set newToDo to make new to do ¬
					with properties {name:currentTodo} ¬
												end if
		end if
			end repeat
		end tell

set theDialogText to "Added " & Total & " Todo Items to Things"
display dialog theDialogText

I mapped this in Alfred to ⌘T so that when I’m in Day One and finish brainstorming what I need to tackle, I can just highlight the list and hit ⌘T and the list is moved to Things. Not brain surgery but really useful for me.

Still though it does feel weird to have to automate using AppleScript on the Mac and Shortcuts on iOS.

Especially now that the automating functionality offered by apps like Day One differs depending on whether you are on a Mac or on iOS. Looking at you Append function that’s available on iOS.

Really pulled my hair out for a while on this issue so hoping to help someone out here.

set newToDo to make new to do ¬
		with properties {name:CurrentTodo} at beginning of list "Today"

This, despite the Cultured Code documentation using Today as an example list in the AppleScript guide.

So, if you use that code and replace “Today” with “Someday” it works like a champ but if you pass it the list “Today” the todo item is created in the Inbox and not the Today area of Things. Weird and it was making me crazy.

Anyway, the easy solution is:

set newToDo to make new to do ¬
		with properties {name:CurrentTodo, due date:current date}