No3371 / obsidian-regex-pipeline

An Obsidian plugin that allows users to setup custom regex rules to automatically format notes.
70 stars 8 forks source link

Can rulesets be exposed as commands? #7

Closed ebullient closed 2 years ago

ebullient commented 2 years ago

I would love to be able to add running a regex ruleset to a macro that I have, but there is no way for me to invoke the plugin in a way that would specify the ruleset (already). You don't need to add icons or anything, but exposing configured rulesets as commands would give a lot of flexibility to use rulesets with other plugins (macros) or directly from slash commands..

No3371 commented 2 years ago

The update is out now. You need to enable it in config, because it seems an anti-pattern of Commands.

I was kinda confused then tried to get an idea about what exactly do you want by visiting your profile, figured out that you are trying to make this work with Customizable Sidebar, right?

Though it should be intuitive enough, noted that the customized sidebar seems works by keeping command Id around, while I am using ruleset name (file name entry in index file) as Id, this means the customized sidebar button will stop working if the command does not exist. (order changed, quick rulesets decreased...)

ebullient commented 2 years ago

The update is out now. You need to enable it in config, because it seems an anti-pattern of Commands.

I was kinda confused then tried to get an idea about what exactly do you want by visiting your profile, figured out that you are trying to make this work with Customizable Sidebar, right?

I was going to add it to an existing macro (that I invoke w/ customizable sidebar)... or invoke it using a / command. Thanks!

ebullient commented 2 years ago

/ command is already epically better. Thank you for adding this!