AppleScript for Day One braindump to Things

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.

Posted

in

,

Current Spins

Top Albums

Check out my album Set It All Down on your favorite streaming service.


Posts Worth Reading:


Letterboxd


Reading Notes

  • Who profits from our constant state of dissatisfaction? The answer, of course, is painfully obvious. Every industry that sells a solution to a problem you […]
  • the shifts have been in place for awhile. A certain kind of book—say those reviewed in the NYRB—will become like opera, or theater, or ballet, […]
  • • No more struggle: “Whatever arises, train again and again in seeing it for what it is. The innermost essence of mind is without bias. […]
  • The real problem, in my mind, isn’t in the nature of this particular Venture-Capital operation. Because the whole raison-d’etre of Venture Capital is to make […]
  • . The EU invokes a mechanism called the precautionary principle in cases where an innovation, such as GMOs, has not yet been sufficiently researched for […]

Saved Links