Advertisement
robofred310

__init__.py

Oct 22nd, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, unicode_literals
  3.  
  4. import octoprint.plugin
  5.  
  6. class DampooPlugin(octoprint.plugin.StartupPlugin,
  7.                        octoprint.plugin.TemplatePlugin,
  8.                        octoprint.plugin.SettingsPlugin):
  9.     def on_after_startup(self):
  10.         self._logger.info("Hello World! (more: %s)" % self._settings.get(["url"]))
  11.  
  12.     def get_settings_defaults(self):
  13.         return dict(url="https://en.wikipedia.org/wiki/Hello_world")
  14.  
  15.     def get_template_configs(self):
  16.         return [
  17.         dict(type="navbar", custom_bindings=False),
  18.         dict(type="settings", custom_bindings=False),
  19.         dict(type="sidebar", custom_bindings=True)
  20.  
  21. __plugin_name__ = "OctoPrint-Dampoo"
  22. __plugin_version__ = "1.0.0"
  23. __plugin_description__ = "Let's Damp it together for OctoPrint"
  24. __plugin_pythoncompat__ = ">=2.7,<4"
  25. __plugin_implementation__ = DampooPlugin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement