iOS Shortcut to append picture to the end of today's daily note?

I’m curious if anyone has even part of the following solution. I would like to get in the habit of adding a daily picture as part my journalling.

Has anyone created an iOS shortcut that does any of the following:

  • Resize a picture
  • Switch vaults (I’m thinking of separating Journaling from PKM)
  • Place it in the attachments folder
  • Append it today’s note

It should be doable, but might be harder to do if you’re using Obsidian Sync.

On iCloud-hosted vaults, you can make this work by modifying the files in your vault folder directly. Something like:

  • Save photo to your media folder (or whatever)
  • save the path to text as a markdown-formatted image embed
  • get your daily note
  • append the path above to the note
1 Like

Funny just your lumberjack plugin, I think it would do some of the hardwork. At least opening the daily note.

Now I just need to learn shortcuts.

These feels like my work 30+ yrs ago in the Unix world. I would have problem, I would start writing a bash script. Then I would have two problems an unfinished script and …

1 Like

Heh. Well, FWIW, Shortcuts is very learnable.

I have not tested it at all, but here is a rough shortcut to do the daily note photo thing:

https://www.icloud.com/shortcuts/090bd8669fd94d40b4a2cfc7d2b6ff48

After an afternoon of playing on my phone/ipad I’m getting closer.

FWIW I’m slain by how painful it is to type for programming on without a real keyboard.

I’ve got most of it working. I’m stuck now on how to get the filename + ext out of the file or the path. My goal is to add all of the photos via a relative path (better portability), ex: “./img_0556.heic”

Any ideas what would work or should I switch over to the MPU forum?

After “save” you can use “saved file” to get file or file size

1 Like

Mind sharing the shortcut itself?

Here it is - was always going to share, it just struck me as not worth sharing until I had debugged. Kinda sad that I’m debugging with alerts, which are effectively log statements.

(I would have got to the finish line without your help. Hat tip to @ryanjamurphy and @udracing

https://www.icloud.com/shortcuts/b8f6d0668e574f26b620851b0082559b

A few key changes from @ryanjamurphy I used “Magic Variables”, I think other languages call them implicit variables. I was struggling with the date formatting game until I noticed the date format I’ve choosen for my day notes matched the short format builtin in Shortcuts.

Clearly this isn’t ready for real sharing because it embeds knowledge of my filesystem.

Also in an ideal world I would figure how looping works and loop over the whole thing for many pictures. However I don’t care enough.

4 Likes

Hahah—that means you’re already halfway to enlightenment, I think.

Good work!

Sorry when I reread that phrasing, it came across as unkind. My intent was only to say that yesterday’s version of the shortcut was good enough for now.

No, no, I don’t think it’s unkind at all. “Perfect is the enemy of done” is an important lesson to apply often.

An alternative phrase my guitar teacher always said about tuning: “Good enough for punk rock.”

1 Like

Ryan - living in Ottawa, after the weekend of protests where I’ve heard many nasty things said, I’m trying to be more reflective in my own comments. I wish to reduce the harm I cause when I’m hasty with my writing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.