Programmatically Associating Images with Notes

(Using Joplin v 2.12.18)

I have a notebook structure which goes as follows:


As you can guess this is a journal with one outer notebook for a year, one inner notebook for the month and one note per day in the format of MONTH-DAY. The journal chronicles events and in my phone are the snapshots which will enhance the contents of each entry. What I am hoping to do is to attach, if available, an image with a day's entry.

For this, I have the following under control - putting all relevant images in a folder - being able to programmatically determine the date and timestamp of the image. Now, the next thing to do is

  • Go through all notes.
  • Based on name of the note (which gives me day and month) and the outer folder (which gives me year), somehow attach or associate all images for this day and month to the note.

I was hoping to get some insight from the folks here on what is the best way to achieve this? In short,

  • Where do I start in terms of going through the notes? Any links or docs would be useful.
  • Also, what is the best way? Append an inline image Markdown at the end of each existing file?

Thanks in advance.

maybe the note overview plugin can offer part of function you want?
if your daily note have same keyword in title, this maybe work.

1 Like

Since you already have the note identified, you want to add the image as a resource to the note. This can be done using joplin API - programmatically I recommend joppy to do this. The example snippets should help you achieve what you want.


Thank you for the reply. I will study the plugin but I get the feeling that if it relies on a keyword match, it may not be what I need. But thanks for the direct. I shall report back if I find success with it. Thanks again!

That sounds like it could solve my problem. I shall study "Joppy" and the examples and do a PoC in this week around it.

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