Categories
Automation Health Tech

Diet success with Due App, shortcuts and app launching

Here’s one truth about how I lose weight: nothing is as effective as simply writing down what I eat.

If I track everything I eat in a calorie tracking app (I use one called Track, but there are a bunch of similar apps), I eat less. Maybe seeing what I’m eating makes me more conservative in my snacking or maybe I don’t want to take the time to log that handful of M&Ms so I skip them. Either way, I’ve lost about 15 pounds during this quarantine, all by simply tracking my calories. 

The thing is that I usually stop logging what I eat after a few weeks. Logging what I eat is a nuisance. I regularly forget to open my calorie tracking application right after I eat and by the time I finally get around to it as I’m sitting down to watch a show before bed, I’ve largely forgotten what I’ve eaten throughout the day.

So what makes this time different?

Well, for starters, I’ve been using the Due application on my iPhone to remind me to enter my calories after breakfast, lunch and dinner each day. Due is a persistent reminder application. Meaning, it just keeps annoying you with reminders until you actually do the damn thing it’s reminding you to do. 

Still, after a couple of weeks of using Due, I started just clicking “done” on the reminder because clicking through the reminder and opening my calorie tracker application just seemed like a pain in the ass and was too much friction. So, I solved that friction point by adding a link in the reminder that opens my calorie tracker in one click. 

In other words, tracking what I’m eating has been working for me because I chained together three different, loosely-coupled technologies here:

  • a decent calorie tracking app that makes a tedious task as easy as possible – Track
  • a persistent, annoying reminder application to remind me to log my calories – Due
  • a link in the reminder to make it super-easy, low-friction to open my calorie tracking application right from the reminder. – iOS shortcut

Some apps support a URL Scheme to open the application (for example, music:// opens the Music application). The Track application doesn’t, AFAIK, have URL Scheme support so instead I just created an iOS shortcut to open the application and I call that shortcut in the reminder like this

IMG 9A9E4424A017 1

So, when the alert pops up on my phone, I just click the red link and Track opens up. Nifty.

But, this Reminder + Link to Application has also been helpful for the Day One #photoaday challenge for the month of September. Every day at mid-morning I get an alert to post a photo from today to Day One with a link to the application that opens Day One and creates a new post:

IMG 1D868C3ACF03 1

Here you’ll see that Day One support the URL Scheme directly so there’s no need for me to create an iOS shortcut, I can just call the new post URL and it works (though, why it doesn’t show up in red in Due is beyond me).  You can do a whole bunch of cool things with the Day One URL Scheme, like go right to the activity feed: dayone://activity  or create an entry with a clipboard image dayone://post?entry=Hello Self&imageClipboard=1. See this list if you want more ideas.

Categories
Tech

Amazon quietly removes ability to download order history

At the end of each month, I run an Automator process on my Mac that loads that month’s Amazon Order History file into a markdown table in Day One. I’ve been doing this for a couple of years now and it’s useful for a whole bunch of reasons. When did I buy something? Just search day one. How much did I spend last month on Amazon? Just look in Day One. 

This month though, I went to download the file from Amazon and the interface for selecting a month’s worth of orders and downloading them is gone.

I reached out to Amazon support on Twitter and through the website and was told that the page had been removed and it was replaced by a “Request My Data” page.

UntitledImage

This isn’t a self-service download portal like the previous version but instead allows you to request ALL of your order history and it takes up to 5 days to receive the data. I submitted my request 3 days ago and haven’t seen anything yet. In any case, this seems like a step backwards to me and makes it more difficult to track on a monthly basis what I’m buying. 

Categories
Automation Post

Log/Append a photo to a Day One entry

Someone posted a question about how to do this on the Day One Community site so I thought I’d build up a little iOS shortcut that:

– checks to see if you have an entry for today, if not it creates a blank one and then prompts you to choose a photo, resizes that photo and then appends the photo to today’s journal entry.

Here’s the shortcut, you’ll need to choose which journal to use and how large you want the inserted photo to be.

Categories
Tech

Essential Working From Home Apps and Tools

All of this working from home has meant that I have not spent this much uninterrupted time behind my personal computer since I do not know when. This is to say, over the past few weeks I have dialed in my personal setup in a way that is super-useful to me and I thought I’d share the apps/tools I’ve started/revisited using since working from home during the quarantine.

First up, Apple’s AirPods Pros.

I’ve never owned headphones with active noise cancelation before but, man, where have these been all of my life???? Right now, there is a huge racket in my house from one of my kids shooting hoops in his room with a nerf basketball. I can feel the ball bouncing but my concentration is not broken because I can not hear the sound of the ball bouncing. This is AMAZING!

Throughout the day I am bathed in the warm nothingness of active noise cancellation. On occasion I’ve noticed that I do not even have music playing, I’m just enjoying the near-silence that they offer. If you need to concentrate in a noisy house, highly recommended.

Audio/Listening/Zoom

Over the past few weeks I’ve evolved a somewhat complicated Zoom/music listening setup on my iMac. At work, we live in Zoom and I’ve had to do some refactoring to balance my music and Zoom needs. I’ll detail a few of those tools here:

Triode: I listen to The Current throughout the day when I’m not actively listening to music from my collection. Triode is *the* best radio playing application, ever. If you listen to internet radio stations, hard to imagine life without it.

I want my music to play through my Kinter Tripath amplifier to my external speakers but want my Zoom/Facetime audio to go through my iMac display. This black magic wizardry is achieved through an application called SoundSource from Rogue Ameoba. Combined with a cheap dongle, I can easily send audio from any app to any output. Awesome application, highly recommended.

As an aside, I have been using this time while trapped in my office to re-rip some CDs into Lossless (ALAC) format and am using XLD running on an old, headless Mac mini to do so.

Other apps for maintaining sanity:

DayOne Journal. I’ve been using this application for years but making notes about what it is like to experience this quarantine has felt important.

Waking Up. Sam Harris’ meditation app has been my meditation app of choice for about a year now. I have less time to use it now that we are all at home but every time I use it, I feel better.

I’ve got a few other notable mentions like Parallels, Microsoft Teams and OneDrive which have all made getting real work in a Windows-centric environment less unproductive. Also, I just started using GeekTool to pipe some useful outputs to my desktop but the jury is still out on how useful that is. If time permits I’ll circle back in a few weeks to update here.

Categories
Links

Friday Links for Feb 21, 2020

Categories
Automation Tech

Logging throughout the day with Day One and iOS shortcuts

Spending some time on the Day One community page on Facebook it seems like for those who journal multiple times per day–adding notes, thoughts, activities throughout the day–there are two schools of thought for capturing throughout the day:

1.) create a new entry in Day One for each of the day’s multiple entries
2.) append to a single daily entry throughout the day.

I fall firmly into the second camp, using markdown bullets and a time stamp to log entries to a single entry throughout the day.

Unfortunately, for all of Day One’s strengths and features it does not make it especially easy to automate the process of appending thoughts/notes to a single day’s entry throughout the day.

In the past, I might have relied on a bit of AppleScript or Keyboard Maestro to solve this problem. But now, my time is split evenly between sitting behind my Mac and using my iPad.

Apple is making it harder and harder to write one-size-fits-all automations that can be used on the Mac and on the iPad and iPhone. Automation is now platform specific: shortcuts on iOS and some combination of automator, AppleScript, keyboard maestro, Alfred, etc. on the Mac.

But whether I’m in front of my Mac or my iPad, I always have my iPhone with me. And while it’s not the best device for capture, I decided to focus my “capture and append” automation efforts on the iPhone rather than string together a bunch of hacks on my Mac.

I wrote an iOS shortcut I wrote does the following:

  • checks to see if a Day One entry exists for today
  • if one doesn’t exist it prompts you to create either:
    • a blank entry
    • an entry using a few prompt questions
  • prompts for log entry
  • asks if you want to put time with the log entry
  • appends the time/log entry to the end of today’s journal entry

If you are going to use this shortcut you must expand the six “Day One” actions in the shortcut and change the “Journal” field to match the name of the journal you’re using in Day One.

You may also want to edit the questions in the “A new entry from prompts” section. Just make sure to split them up with a line break.

Once you make those changes, it should just work for you.

The big caveat here is that if you use Day One on both iPad and iPhone, this shortcut seems to only work on one device. It works great on my iPhone. But if I try to use it on my iPad and I haven’t yet opened Day One on my iPad the shortcut doesn’t realize that I’ve already created an entry for today on my iPhone.

This seems to be related to background syncing of the journal contents. The solution is just use it on one iOS device OR make sure you open up Day One and that it syncs before running it on that other device. That being said, even when I do run it on the iPad, the appended line doesn’t show up on the entry, which is weird because if I view the entry on my iPhone, it’s there.

Again, syncing seems to be the issue here. Day One support has been helpful (as always) in helping me troubleshoot this but it seems like iPadOS background syncing is just flakey right now.

Here’s a link to the shortcut. Ok, happy logging!

Note/Update: the shortcut now copies the entry to your clipboard. Occasionally it seems like the shortcut doesn’t actually append the log entry as expected. I don’t know why. Restarting my iPhone seemed to solve the problem so probably syncing related but in any case, by copying the entry to your clipboard if for some reason the log note doesn’t appear when the entry is opened, you can always just paste it in from the clipboard. Lame, I know. I wish shortcuts were more reliable.

Categories
Automation

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.

Categories
Automation

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