This is a late reply, but I finally thought I might make changes to the script to use the builtin command instead, but in my research, it seems like both actually is builtin to most shells these days, but the “test” and “[” commands needs to be compatible with the old externals for compatibility. I have changed it in my script as it looks like the new “[[” is more robust, besides it gave me a reason to try and commit changes to the github repository!
I also added an export database switch to the code, as I am still not trusting Joplin to not delete all my notes again (although it seems better now that I got Nextcloud sync working instead of local sync.)
Now one can easily use a different joplin profile, by uncommenting and commenting at the top of the script to use the desktop profile for instance. If used, it also checks to see if the desktop app is running before submitting the new note to prevent corrupting the database.
Another thing I was thinking of in regards to the script: should the tags people enter with the “+”-prefix be left in the note instead of removing them from the text as it currently does? The idea was that one could add them anywhere in the command, but if one uses them as words in the note body it might make sense to keep them in the text? Not sure how to implement this… remove tags entered before the title, but keep the ones entered after as part of the note body? I am currently not a big user of tags, so I am just trying to imagine use cases…