Tag: Day One

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.

Amazon Order History to Markdown table in Day One

Back in the spring I wrote an automator action that incorporated some Python code to take a downloaded Amazon Order History file and massage it into a nice Markdown table and creates a Day One entry.

A few months back though the Day One command line tool stopped working and that broke this action. But surprise!!! The command line tool works again (although not as well as it used to). So I modified the automator action to get it working again. 

So, pop this workflow in your ~/Library/Services folder and you can just right click on the downloaded Amazon order history file to create a Day One entry from the purchases. 

Screen Shot 2020 01 08 at 7 59 24 AM

 

This is what the Markdown table looks like as a Day One entry (atypically expensive month, FWIW 🙂

Screen Shot 2020 01 08 at 8 02 20 AM

Shortcut: Day One braindump to Things

I use Day One as a journal almost every day. Most mornings start with me doing a bit of a brain dump into Day One, listing anything that’s on my radar that I need to deal with.

So I wrote a shortcut to help me deal with those brain dumps a bit better.

This shortcut:

– takes a list of items from the clipboard (so, I would just select/copy the list in Day One) and creates entries in Things (my todo list app of choice for the past many years).

– With a bit of a rub: if the tasks contains the word “today” (e.g. I need to call Joe today) the shortcut puts the task in the Today section of Things instead of in the Inbox section.

Admittedly this is not really wizardry level stuff here and the inability to run a similar procedure on my Mac (shortcuts only working on iOS I mean) limits its use a bit. But anyway, for anyone running Day One on iOS who is interested, here’s the shortcut I use to extract a brain dump from Day One and load the tasks into Things.

Turn Amazon Order History into a Markdown Table for Day One

The other day I posted about using Keyboard Maestro to automate the process of getting my monthly Amazon Order history into a Day One Journal entry. That was the first step of the automation of this task.

This has been a bit more challenging to automate than I was first thinking. I’m working towards this 3 step process:

  • Step 1: open up Day One and in Safari open up the URL for Amazon Order History report screen. [Done]
  • Step 2: automatically download this month’s Amazon Order History report [Need to figure this out]
  • Step 3: create a journal entry from a downloaded Amazon Order History .csv file [Now Done]

I am still messing around with Keyboard Maestro for step 2 but was able to hack together a pretty handy Automator workflow for step 3. It’s a python + BASH script that

  • takes a .csv file, strips out the unnecessary columns,
  • totals up the amount spent for the month
  • create a Markdown table of the important columns from the .csv
  • creates a Day One Journal entry and tags it “Money”

(more…)