SimonTC / obsidian-note-autocreation

An Obsidian plugin for automatically creating notes when linking to non-existing notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FR: Please support quickadd

YIRU69 opened this issue · comments

Hi, friend. I love you plugin very much. It help me a lot.
When I create a note, I usually use quickadd template.
So can it support quickadd.
Appreciation!

Hi! I'm very happy you like the plugin.

I will see what I can do to also support Quickadd templates. I need to do some digging though as I'm not sure there is a public API I easily can use.

@brimwats thanks for the link. Unfortunately to use that API I need access to the params object which you only have access to through QuickAdd macros. (See the comment here).
It is simple enough to get access to the configured QuickAdd choices so I am now thinking that maybe I can get QuickAdd to execute the choice somehow. I have to look into how QuickAdd works and maybe contact the author to see if something can be done.

commented

@SimonTC Quickadd plugin had update and add the API. Could it help you to achieve the enhancement?

@YIRU69 Yes. I think it should be possible with the API. I will try to see if I can get something working this week.

Could you actually give me an example of a template you are using @YIRU69? And maybe explain how you would expect it to work with Note Auto Creator? I'm not using QuickAdd myself, so I am not so familiar with typical use cases.

commented

It is very similar to the Templater plugin, except that it requires the specification of certain parameters for input, such as the {{VALUE}} parameter. For example, if there is title: {{VALUE}} in my notes, a prompt window will appear when I create a note, allowing me to input the parameter. It supports multiple parameters, and you can try it out when you have time.

My personal usage scenario is not complicated, mainly using one parameter. I hope that when using the template quickly, I can directly input the {{VALUE}} parameter. Please let me know if there are any questions, and I will respond as soon as possible.

@YIRU69 there is now a beta release for this. Life has gotten in the way, so I have not had time to test this thoroughly, but from my initial testing it works correctly.
Could you try it out and see if there are any issues?
You can either install the update manually or use BRAT to install it.
I have updated the readme with instructions on how to use templates from QuickAdd, but it basically works the same as templates from Templater.

commented

It words that I make a quick test.