Plugin-Examples
Plugin-Examples copied to clipboard
Example of how to retrieve settings from Non SettingsPlugin classes?
I'm creating a variation on the Comment Remover plugin, but it also needs a handful of settings. octoprint.filemanager.util.LineProcessorStream doesn't appear to have easy access to self._settings, though, so retrieving them when it's time to actually process things is a bit tricky.
Is there a recommended/correct way to retrieve them outside of the plugin class itself?
I'd subclass the utility class and provide the settings object as a constructor parameter to the subclass instance.