Skip to content

Instantly share code, notes, and snippets.

@cp2004
Created January 15, 2023 15:26
Show Gist options
  • Save cp2004/75e71e487ca3cda2ee0a08d6ba0f0c24 to your computer and use it in GitHub Desktop.
Save cp2004/75e71e487ca3cda2ee0a08d6ba0f0c24 to your computer and use it in GitHub Desktop.
ook to ok
# coding=utf-8
from __future__ import absolute_import
def convert_ook_ok(comm, line, *args, **kwargs):
if "ook" not in line:
return line
return line.replace("ook", "ok")
__plugin_name__ = "Convert ook to ok"
__plugin_version__ = "1.0.0"
__plugin_author__ = "Charlie Powell"
__plugin_description__ = "Convert ook to ok in printer responses"
__plugin_pythoncompat__ = ">=2.7,<4"
__plugin_hooks__ = {
"octoprint.comm.protocol.gcode.received": (convert_ook_ok, 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment