Open pedrohdz opened 4 years ago
I like the idea of a plugin architecture, but so far you don't do anything but register the plugins, so you need to flesh this out a bit first before I can have an opinion.
Hey @regebro ! Thanks for taking a quick peek. Maybe I should not be using the work "plugin" at all here? :-)
The use case I am after here is the ability to register Docutil directives. As far as I can tell, thing we need to accomplishing this is registering the directive on start up. Are there other plugin points I missed?
I could use a different naming convention that does not include the name "plugin" not sure what that would be though. Open to suggestions. It is a "directive plugin" though.
Another option is generalizing the naming so it can be expanded to include other types of plugins in the future. If that is the goal, what other types of plugins are you envisioning, use cases, connection points?
Let me know! And thanks again!
Yeah, calling it a plugin when you are only registering directives seems overkill. And you don't need to first register the plugin to later register the directive, I think, you could just register the directive directly.
I'll think about what other plugin points there could be. If I can't come up with anything we'll just add directives.
Hey all! Before I proceed, please keep in mind that this is a proof of concept/work in progress. I would like to get general feedback before finishing up the code, adding tests (including fixing the existing tests), updating the documentation, and so on.
I just want to make sure I'm heading the the correct general direction first.
There are a couple of high level parts to this:
--directive-plugin|-D [DIRECTIVE_PLUGIN_MODULE]
argument to thehovercraft
command to make it easier to add third-party Docutils directives.hovercraft/directive/null.py
in the PR.I started implementing a PlantUML plugin which can be found at pedrohdz/muextensions. The documentation on how to use it with Hovercraft! is in the README. Here is the general idea:
Please let me know what you all think. I can add the finishing touches if this is looking good so far, along with implementing any recommendations.
Thanks!