alangrainger / obsidian-google-photos

Connect to Google Photos from Obsidian
GNU General Public License v3.0
93 stars 5 forks source link

[FR] Add thumbnail URL to note properties when adding photo #28

Closed Kageetai closed 11 months ago

Kageetai commented 11 months ago

I really love the idea of this plugin and will use it for my journaling. I think it can finally replace some external apps I have been using for this. One more idea would just be to be able to add the URL of the thumbnail also to the notes properties in a chosen property name. Would that be hard to implement?

alangrainger commented 11 months ago

See here: https://github.com/alangrainger/obsidian-google-photos#do-the-images-have-to-be-saved-locally-can-they-be-remote-thumbnails

Those links don't exist.

Kageetai commented 11 months ago

Sorry, I think I explained wrongly. I didn't mean the URL, but the Obsidian file path to the local thumbnail, just so it can be used more easily by other dataviews or so.

alangrainger commented 11 months ago

Understood. In that case I will need quite a bit more detail about how this would work.

Consider a daily journal entry where I add 10 photos. Which one(s) will go in the frontmatter, and how would they be stored?

Kageetai commented 11 months ago

Fair point, I only thought of the case with a single photo. The note properties allow arrays of strings as well, so this should technically be possible to just store all photos added to the note, no? I suppose it would need to be an array with a single item as well, for consistency.

alangrainger commented 11 months ago

I think for a custom use-case like this, it would be best to write a Templater or CustomJS script to copy the links and add them to the frontmatter. Set it to a hotkey and then run it after adding a photo. It's unlikely many people would want this particular functionality.

Kageetai commented 11 months ago

Okay, true, just wanted to bring up the idea to determine whether it's feasable, thx

connradolisboa commented 10 months ago

Where do I look for the templater script? I would love to auto add at least the first image link to the properties. This way I can use projects plugin gallery view in my notes.