WIP: Moving bundled plugin docs to official docs
The wiki is not a prominent enough location for these kind of things apparently.
This commit is contained in:
1 parent
5470aaaa3a
commit
3995a65f6c
8 files changed
+487
-10
No files matched your search
+10
-10
@@ -17,7 +17,7 @@ Available plugin hooks
|
||||
octoprint.accesscontrol.appkey
|
||||
------------------------------
|
||||
|
||||
.. py:function:: hook(*args, **kwargs)
|
||||
.. py:function:: acl_appkey_hook(*args, **kwargs)
|
||||
|
||||
By handling this hook plugins may register additional :ref:`App session key providers <sec-api-apps-sessionkey>`
|
||||
within the system.
|
||||
@@ -42,7 +42,7 @@ octoprint.accesscontrol.appkey
|
||||
octoprint.comm.protocol.action
|
||||
------------------------------
|
||||
|
||||
.. py:function:: hook(comm_instance, line, action, *args, **kwargs)
|
||||
.. py:function:: protocol_action_hook(comm_instance, line, action, *args, **kwargs)
|
||||
|
||||
React to a :ref:`action command <sec-features-action_commands>` received from the printer.
|
||||
|
||||
@@ -77,7 +77,7 @@ This describes actually four hooks:
|
||||
* ``octoprint.comm.protocol.gcode.sending``
|
||||
* ``octoprint.comm.protocol.gcode.sent``
|
||||
|
||||
.. py:function:: hook(comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs)
|
||||
.. py:function:: protocol_gcodephase_hook(comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs)
|
||||
|
||||
Pre- and postprocess commands as they progress through the various phases of being sent to the printer. The phases
|
||||
are the following:
|
||||
@@ -164,7 +164,7 @@ This describes actually four hooks:
|
||||
octoprint.comm.protocol.scripts
|
||||
-------------------------------
|
||||
|
||||
.. py:function:: hook(comm_instance, script_type, script_name, *args, **kwargs)
|
||||
.. py:function:: protocol_scripts_hook(comm_instance, script_type, script_name, *args, **kwargs)
|
||||
|
||||
Return a prefix to prepend and a postfix to append to the script ``script_name`` of type ``type``. Handlers should
|
||||
make sure to only proceed with returning additional scripts if the ``script_type`` and ``script_name`` match
|
||||
@@ -198,7 +198,7 @@ octoprint.comm.protocol.scripts
|
||||
octoprint.comm.transport.serial.factory
|
||||
---------------------------------------
|
||||
|
||||
.. py:function:: hook(comm_instance, port, baudrate, read_timeout, *args, **kwargs)
|
||||
.. py:function:: serial_factory_hook(comm_instance, port, baudrate, read_timeout, *args, **kwargs)
|
||||
|
||||
Return a serial object to use as serial connection to the printer. If a handler cannot create a serial object
|
||||
for the specified ``port`` (and ``baudrate``), it should just return ``None``.
|
||||
@@ -274,7 +274,7 @@ octoprint.comm.transport.serial.factory
|
||||
octoprint.filemanager.extension_tree
|
||||
------------------------------------
|
||||
|
||||
.. py:function:: hook(*args, **kwargs)
|
||||
.. py:function:: file_extension_hook(*args, **kwargs)
|
||||
|
||||
Return additional entries for the tree of accepted file extensions for uploading/handling by the file manager.
|
||||
|
||||
@@ -310,7 +310,7 @@ octoprint.filemanager.extension_tree
|
||||
octoprint.filemanager.preprocessor
|
||||
----------------------------------
|
||||
|
||||
.. py:function:: hook(path, file_object, links=None, printer_profile=None, allow_overwrite=False, *args, **kwargs)
|
||||
.. py:function:: file_preprocessor_hook(path, file_object, links=None, printer_profile=None, allow_overwrite=False, *args, **kwargs)
|
||||
|
||||
Replace the ``file_object`` used for saving added files to storage by calling :func:`~octoprint.filemanager.util.AbstractFileWrapper.save`.
|
||||
|
||||
@@ -344,7 +344,7 @@ octoprint.filemanager.preprocessor
|
||||
octoprint.server.http.bodysize
|
||||
------------------------------
|
||||
|
||||
.. py:function:: hook(current_max_body_sizes, *args, **kwargs)
|
||||
.. py:function:: server_bodysize_hook(current_max_body_sizes, *args, **kwargs)
|
||||
|
||||
Allows extending the list of custom maximum body sizes on the web server per path and HTTP method with custom entries
|
||||
from plugins.
|
||||
@@ -382,7 +382,7 @@ octoprint.server.http.bodysize
|
||||
octoprint.server.http.routes
|
||||
----------------------------
|
||||
|
||||
.. py:function:: hook(server_routes, *args, **kwargs)
|
||||
.. py:function:: server_route_hook(server_routes, *args, **kwargs)
|
||||
|
||||
Allows extending the list of routes registered on the web server.
|
||||
|
||||
@@ -437,7 +437,7 @@ octoprint.server.http.routes
|
||||
octoprint.ui.web.templatetypes
|
||||
------------------------------
|
||||
|
||||
.. py:function:: hook(template_sorting, template_rules, *args, **kwargs)
|
||||
.. py:function:: templatetype_hook(template_sorting, template_rules, *args, **kwargs)
|
||||
|
||||
Allows extending the set of supported template types in the web interface. This is interesting for plugins which want
|
||||
to offer other plugins to hook into their own offered UIs. Handlers must return a list of additional template
|
||||
|
||||
Reference in new issue
Block a user