Hi Cannibalox, thank you for your answer.
I was thinking about an easier method of writing question-answer LogSeq flashcards.
I was wondering if macros could be used to do something like:
Type the following in a LogSeq block: {{makecard question answer}}
Press enter
Have the macro to expand into the following:
I’m aware of templates but they don’t seem to accept arguments (i.e. I can’t input “quesiton” nor “answer” to a template), if they did they would be perfect for this I think.
Do you think I can somehow use :editor/new-block in a macro to achieve this?
afaik, you can’t create flashcards using macros (not sure we can create sub bullet via macros, and I’m not a flashcards user myself).
that said, I would recommend a text expander like Espanso, Autohotkey or fastkeys… although not dedicated to logseq, these tools work great in conjunction with logseq (you can search the discord for scripts or use-cases examples).
alternatively, you can try logseq plugins like : Smart Blocks, Power Blocks or Full House Templates that should theorically achieve what you want.
Hi all, thanks for these macros, pretty interesting. Have any of you figured out a way to produce a macro which turns dynamic variables into strings? My goal is to build a template that creates a series of pages based on the page the template is currently built on. Thanks!
If I am not mistaken, you can have exactly what you want → turn dynamic variables into editable strings, stripping the “dynamic” from the Macro with @mentaloid’s code here;
There is a section that covers Macros briefly, referenced in the Templates page listed in docs.logseq.com. I have not seen anything on how to build custom commands in the official docs. But I do not fully grasp their usefulness over templates. They cannot have Dynamic variables like %time% can they? And they are limited to one block without properties only.
They differ from Templates in that they are defined in config.edn. As are Macros. Templates are or can be defined in a page.
I imagine that command/macros could have the benefit to be faster to call with few types. instead of /template and then template name.
Do you know any solution to call the template faster?
@stdword how ti use the full house template plugin?
Currently I have a template for meeting and I would like to have a shortcut to create it. How to do it?
Is there a more exhaustive stent step guide?
Thanks