Setting up an automated system for using 3 different commands sequentially

I would like to automate the adding of content to my book library. My workflow for this requires the use of multiple plugins running one after the other, and being a complete noob to coding, I have no idea how to get around this. Any advice and help with be extremely appreciated!

Things I have tried

Manually recreating the workflow I want. It is however, incredibly tedious to manage this for the hundreds of books I would like to add to my Library Database. I want to be able to get the hurdles out of the way so I can focus on making my learning notes and reviews every time I open my vault.

My workflow looks something like this:

  1. Add book via booksearch plugin using a specified template to key in all the required info

  2. Then, replace low resolution cover links with higher res versions via a user script found on github. This process requires user input of the specified file via inserting a modal Template through the Templater plugin. This is the code snippet:

var file = app.workspace.getActiveFile()
var t = await
var s = t.replaceAll("", "").replaceAll("&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api","?fife=w600-h900&source=gbs_api").replaceAll("&printsec=frontcover&img=1&zoom=1","?fife=w600-h900&source=gbs_api")

app.vault.modify(file, s)

  1. Using the plugin Local Images to replace all online links with offline images.

  2. And finally, I save the file to lint the note. This corrects any formatting issues I’ve specified to be fixed in the plugin’s options, while also updating the mod time as well.

What I’m trying to do

Set up a system where after my input for what book I wish to add to my Reading List via the booksearch plugin, some commands automatically process in that note.
The workflow goes like this.

There’s a slight caveat in that between running the command for downloading local images, a short time window should be given to be sure the download is completed.

Thank you all!

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