docs
docs copied to clipboard
Add the documentation about "get_current_plugin_path" method
Document the method "get_current_plugin_path" in the settings page
We'll try to add also a get_plugin
method to get the object itself
Do you thing from a devx point of view, which name is better?
get_current_plugin_path
get_plugin_path
plugin_path
?
Are two different topics, correct? 1- We'll try to add also a get_plugin method to get the object itself 2- Question about the name
If correct, I like the method to get the current plugin instance, then the dev can do:
get_plugin().load_settings()
get_plugin().path
Maybe the method get_plugin
can have the argument plugin_name
, if not specified it returns the current plugin instance.
Can be useful to get the plugin instance from other plugins?
Thanks @sambarza merged your idea with @Jhonnyr97 PR (https://github.com/cheshire-cat-ai/core/pull/550)
Now we can do from a plugin:
cat.mad_hatter.get_plugin().id # gets plugin folder name
cat.mad_hatter.get_plugin().path # gets plugin folder path
cat.mad_hatter.get_plugin().load_settings()
cat.mad_hatter.get_plugin().save_settings(settings)