You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm opening this to go over a feature I'm working on that requires a bit of a change on the internals of skybot, so I thought it'd be best to open an RFC issue before I go and start throwing the pull requests out there.
I have been wanting to pull in plugins from external modules. Why? Because there are plugins that I have that I'd like to share - plugins which are useful (or useless but funny) but which I don't think fit in with the main skybot repository. They might require external modules (like a few reddit plugins I've made or the amazon plugin) or are just less useful for other folks (a plugin for an in-joke with the IRC channels the bot runs on).
I'm also be interested in pulling skybot as a dependency of a separate application so we can extend on top of it without having to copy all the files and adding in custom plugins with a simple install (eg teampeggle/ppp-helpdesk). Right now it's painful because I have to manually sync all the changes.
It is possible to do this! I've been experimenting with a few things to do this, which mostly entails cleaning up the codebase:
Clean up skybot's imports / reloader so they stop abusing globals WIP
Clean up the hook API on functions (stop over-polluting the function properties)
Update the reloader to pull in plugins via module name rather than filename
Add a configuration value to specify plugins to pull in via module
Ideally, the configuration for specifying plugins would default to all plugins under skybot.plugins.* (backwards compatibility), and if specified would then start pulling in plugins to use, setting up the reloader, etc.
After these are complete, any module within the python path can be used as a plugin! EG, if you were to pip install skybot-plugin-awesome, you could pull it in as a fantastic new plugin without copying it to the plugins directory!
Thoughts, concerns, etc?
The text was updated successfully, but these errors were encountered:
I'm opening this to go over a feature I'm working on that requires a bit of a change on the internals of skybot, so I thought it'd be best to open an RFC issue before I go and start throwing the pull requests out there.
I have been wanting to pull in plugins from external modules. Why? Because there are plugins that I have that I'd like to share - plugins which are useful (or useless but funny) but which I don't think fit in with the main skybot repository. They might require external modules (like a few reddit plugins I've made or the amazon plugin) or are just less useful for other folks (a plugin for an in-joke with the IRC channels the bot runs on).
I'm also be interested in pulling skybot as a dependency of a separate application so we can extend on top of it without having to copy all the files and adding in custom plugins with a simple install (eg
teampeggle/ppp-helpdesk
). Right now it's painful because I have to manually sync all the changes.It is possible to do this! I've been experimenting with a few things to do this, which mostly entails cleaning up the codebase:
Ideally, the configuration for specifying plugins would default to all plugins under
skybot.plugins.*
(backwards compatibility), and if specified would then start pulling in plugins to use, setting up the reloader, etc.After these are complete, any module within the python path can be used as a plugin! EG, if you were to
pip install skybot-plugin-awesome
, you could pull it in as a fantastic new plugin without copying it to the plugins directory!Thoughts, concerns, etc?
The text was updated successfully, but these errors were encountered: