Homepage    |    GitHub    |    API    |    Wiki    |    FAQ

Plugin: Replace Resources

Replace Resources

Introducing my beta release of "Replace Resources", a Joplin Plugin that mass replaces Resources.

I got tired of manually replacing resized images (to save space on my free Dropbox account), so wrote this to automate the Joplin side of things.

Note: due to Joplin's synchronisation conflict safeguards, this is a two-step automated process, first deleting resources and starting synchronisation for you, followed by posting (creating) resources using the original resource id.

Important: your Notes are NOT updated at any stage, and your source files are NEVER deleted, they are simply moved to different locations so you know the status of each file/resource.

I'm calling this a beta as it works functionality as I desire, however I'm new to Joplin/Typescript/Jest/Node and am having some challenges figuring out how to mock things so I can run unit tests correctly.
So any guidance on this topic will be very much appreciated!

6 Likes

Thanks for doing this! Seems like we are getting a couple new plugins each week.

You might want to @ Laurent or CalebJohn if you don't get suggestions from the community.

1 Like

Thank you for sharing this plugin!

I wonder, is it possible to run the resource replacement automatically? as a scheduled job or every time I run Joplin

The use case is having the latest rendered release in a note, i.e. putting processed versions of a work to the note related to it.
Say I render a .pdf from latex, (or getting a binary from source code, generating a .png chart from .csv, etc) and would like to put the .pdf to its place in note structure.

1 Like

Hi graphit0,
yes it will be. I will look at that for you.

I’ve split your request into two enhancements if that’s okay?

The easier initial solution (I think) will to be to have it run on startup.

1 Like

@graphit0 I've made that update for you. Run on start (with bonus also after every sync!).
Here Release v0.12-beta.1 · manuerwin/joplin-plugin-replace-resources · GitHub

1 Like

Perfect :ok_hand: ! It just works! In fact, it works so well, I feel like I don't need a scheduled replacement. For my personal use cases, I can adjust the sync frequency and it's going to be just fine.

I'm still testing it and probably will be doing it for a while but so far it works great. At last, I can tightly integrate Joplin with changing files and make my notes truly evergreen :evergreen_tree:.

I think this plugin opens up new horizons for notetaking. So, probably I will take some time exploring those :slightly_smiling_face:

Thank you so much for your work!

1 Like

Really really glad to hear this works for you :slight_smile:

Please do suggest enhancements !
Ideally via GitHub please
https://github.com/manuerwin/joplin-plugin-replace-resources/issues?q=is%3Aopen+is%3Aissue :slight_smile: