From 0ac3881897d398e80e83fa0a58c14dd5a6ac43e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 20 Sep 2016 10:29:53 +0200 Subject: [PATCH] Use better name than "hook" for various plugin hook documentation --- docs/plugins/hooks.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 525dc5e0..710ff198 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -231,7 +231,7 @@ octoprint.accesscontrol.appkey octoprint.cli.commands ~~~~~~~~~~~~~~~~~~~~~~ -.. py:function:: hook(cli_group, pass_octoprint_ctx, *args, **kwargs) +.. py:function:: cli_commands_hook(cli_group, pass_octoprint_ctx, *args, **kwargs) By providing a handler for this hook plugins may register commands on OctoPrint's command line interface (CLI). @@ -476,7 +476,7 @@ This describes actually four hooks: octoprint.comm.protocol.gcode.received ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. py:function:: hook(comm_instance, line, *args, **kwargs) +.. py:function:: gcode_received_hook(comm_instance, line, *args, **kwargs) Get the returned lines sent by the printer. Handlers should return the received line or in any case, the modified version of it. If the the handler returns None, processing will be aborted and the communication layer will get an @@ -682,7 +682,7 @@ octoprint.filemanager.preprocessor octoprint.printer.factory ~~~~~~~~~~~~~~~~~~~~~~~~~ -.. py:function:: hook(components, *args, **kwargs) +.. py:function:: printer_factory_hook(components, *args, **kwargs) Return a :class:`~octoprint.printer.PrinterInstance` instance to use as global printer object. This will be called only once during initial server startup.