Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 424 Bytes
# coding=utf-8
def gcode_script_variables(comm, script_type, script_name, *args, **kwargs):
if not script_type == "gcode" or not script_name == "beforePrintStarted":
return None
prefix = None
postfix = None
variables = dict(myvariable="Hi! I'm a variable!")
return prefix, postfix, variables
__plugin_name__ = "gcode script variables"
__plugin_hooks__ = {"octoprint.comm.protocol.scripts": gcode_script_variables}