Tot Notes
July 23, 2024 at 5:50 PM by Dr. Drang
Against my better judgment, I decided to write a Shortcut today. Even worse, I wanted it to be able to run on my Apple Watch. After several iterations, all of which looked to me to be functionally identical, I finally hit upon one that worked.
The goal was to have a complication on my watch that I could tap, dictate a short note to, and have the note saved to Tot with time and location stamps. Like this (but without the checkerboards to obscure my location):
The complication that runs the Shortcut is at the bottom center of the Modular face, which is the one I normally use. This makes it handy for whatever ideas or observations I want to record when I’m out hiking or kayaking.
I can, of course, run it from my phone, too, but the main point of writing this Shortcut was to have a quick way of making notes like this when the phone isn’t handy.
You can download the Tot Notes Shortcut from its iCloud link. Here’s an annotated view of all the steps:
Step | Action | Comment |
---|---|---|
1 | Ask the user to dictate some text. This will be the note. | |
2 | Get today’s date and time. | |
3 | Format the date and time as yyyy-mm-dd HH:MM:SS. | |
4 | Get the current location. | |
5 | Get the latitude of the current location. | |
6 | Truncate the latitude to 6 decimal places. | |
7 | Get the longitude of the current location. | |
8 | Truncate the longitude to 6 decimal places. | |
9 | Put the date, time, latitude, longitude, and note into a paragraph with a trailing newline. | |
10 | Add the paragraph to the end of Tot dot #7. |
As I said at the top, this is what I came to after quite a lot of backing-and-forthing with code that should have worked exactly like this version. Every earlier version did work when run from my phone; it was only this version that finally worked when run from the watch. That’s Shortcuts for you.
You may be wondering why I’m using Tot instead of Drafts. First, I bought Tot when it was on sale a few weeks ago, so it’s at the top of my mind right now. Second, while it’s nice that Drafts isn’t limited to just seven documents, I was worried that my notes would get lost in its infinitude. Tot’s limitations impose (I hope) a discipline that will have me going through my dictated notes and clearing them out frequently.