Commit graph

60 commits

Author SHA1 Message Date
Gina Häußge
ee185230a4 Refactored plugin docs + improved docs on sortables 2016-03-24 16:42:41 +01:00
Gina Häußge
6d95a5849b Add docs for hook ordering 2016-03-24 09:38:52 +01:00
Gina Häußge
1d3dfffc67 Some documentation fixes 2016-03-23 10:40:36 +01:00
Gina Häußge
780794c466 Merge branch 'development' of https://github.com/bwgan/OctoPrint into pr/bwgan/development
Conflicts:
	src/octoprint/daemon.py
2016-01-29 09:04:58 +01:00
bwgan
f8c0df4e78 Typo and spelling fixes
Fixes various spelling issues and typos.
2016-01-28 18:59:38 +00:00
Gina Häußge
8ed3bcb094 Slight changes in CLI structure for performance reasons
Having the plugin commands on the first level of --help proved to be
a bad idea since it basically kills every chance of lazy loading the (expensive)
plugin context. Using a sub command for anything plugin related allows us
to only fire up the plugin context if a plugin command is expected, saving us
some precious seconds of operation in all other cases.

For conformity reasons the dev sub commands were now restructured
similarly.
2015-10-30 16:28:34 +01:00
Gina Häußge
c6f1088ccf <plugin identifier>:<command> => plugin:<plugin identifier> command 2015-10-30 10:14:21 +01:00
Gina Häußge
ec491c3d0d devel:newplugin => dev:plugin new, +dev:plugin install, +dev:plugin uninstall 2015-10-30 10:10:47 +01:00
Gina Häußge
3c2d2b579d Documention for CLI and its development 2015-10-29 17:37:05 +01:00
Gina Häußge
aeb4c21657 Started documenting octoprint.cli.commands hook 2015-10-27 12:18:01 +01:00
Gina Häußge
f0ab517857 Merge branch 'dev/uiPlugin' into devel 2015-09-10 16:25:34 +02:00
Gina Häußge
19c8b8e905 Documented UiPlugin type and enhanced existing docs 2015-09-10 15:43:30 +02:00
Nicanor Romero Venier
74b0056095 Added info to the hook's docs 2015-09-07 10:52:03 +02:00
Nicanor Romero Venier
fa95507177 Included an early return if ret is None
Also corrected typos, received instead of recieved.
2015-09-07 10:04:06 +02:00
Nicanor Romero Venier
ced18c86e0 Added docs for the gcode.recieved hook 2015-09-03 18:43:07 +02:00
Gina Häußge
08c14e2e45 Wizard templates can now indicate they are mandatory
This will only style them in a special way and influence sorting. Plugins still need
to ensure that a step is not skipped through the use of the onWizardTabChange callback
in the view model.
2015-08-21 18:24:25 +02:00
Gina Häußge
6691cc00a5 Documentation of the wizard plugins & slight refactoring 2015-08-20 12:50:45 +02:00
Gina Häußge
c5b355705a Inject user manager into plugins 2015-08-18 13:30:23 +02:00
Gina Häußge
67a0fd11dd PluginSettings.get_plugin_data_folder moved to OctoPrintPlugin.get_plugin_data_folder
That way plugins don't need to implement the SettingsPlugin mixin in order to access their data folder, which is now an injected property in OctoPrintPlugin. Plugin authors should still always use the getter since that will also make sure the folder actually does exist (lazy creation).

PluginSettings.get_plugin_data_folder has been marked as deprecated.
2015-06-24 13:59:45 +02:00
Gina Häußge
c527338cb8 Docs: Updated plugin tutorial to utilize new cookiecutter template 2015-06-11 15:04:27 +02:00
Gina Häußge
592cad5b99 Deprecated AppPlugin mixin and introduced octoprint.accesscontrol.appkey hook instead
Plugins implementing the mixin will automatically be migrated to providing the single mixin method as hook handler.
2015-06-09 18:50:55 +02:00
Gina Häußge
fde543f19e [doc] octoprint.ui.web.templatetypes hook is now documented 2015-06-08 12:05:29 +02:00
Gina Häußge
3dc0452a45 Adjusted docs to describe new web asset handling 2015-06-03 20:21:12 +02:00
Gina Häußge
61af59cca1 New hooks for command processing in comm layer
Added phase specific hooks for queuing, queued, sending and sent phases of a command ("octoprint.comm.protocol.gcode.<phase>"). Removed old queuing phase hook and declared as obsolete hook in plugin manager to prevent plugins that depend on it from being enabled.

Adding those new hooks also necessitated refactoring the whole command processing, made it more modular and added phase specific handler functions that allow handling all blocking commands centrally for example.
2015-05-28 17:06:24 +02:00
Gina Häußge
ceb0e29da3 Changed existing octoprint.server.http.* hooks to prefix routes with /plugin/<identifier>/
This will hopefully prevent conflicting routes between multiple plugins from being registered and also ensures a more consistent behaviour compared to BlueprintPlugin mixins.

 Thanks to @Salandora for bringing this up.
2015-05-27 14:30:41 +02:00
Gina Häußge
5a89cc6a2a [doc] Added example for the octoprint.server.http.routes hook 2015-05-26 14:29:22 +02:00
Gina Häußge
2317d0cf27 Documentation for new hook "octoprint.server.http.routes" 2015-05-26 13:16:57 +02:00
Gina Häußge
4c7520efb9 New hook "octoprint.server.http.bodysize" and lifecycle support for restart needing hooks
The new hook allows extending the list of rules for maximum body sizes differing from the default of 100KB and can be used by plugins to allow uploads to them that exceed that file size.

Also extended the plugin manager to detect plugins that implement restart needing hooks (such as the above one) and handling those plugins the same as plugins containing implementations that inherit from octoprint.plugin.core.RestartNeedingPlugin
2015-05-11 15:47:40 +02:00
Gina Häußge
34f1aa421f [doc] Added *args, **kwargs to all hooks and documented adjusted gcode hook signature
(cherry picked from commit 30d79f4)
2015-04-29 17:32:38 +02:00
Mark Walker
894aa9bc5e Add a short explanation of additional available callbacks 2015-04-28 04:24:59 -07:00
Gina Häußge
c6fdab554b [doc] documented viewmodels and their callbacks and dependency injection for usage in plugins 2015-04-23 17:27:25 +02:00
Gina Häußge
a996f7b6fb New hook octoprint.filemanager.preprocessor
Allows preprocessing files that are uploaded or otherwise added to the system (e.g. through slicing) before their contents are saved to disk
2015-04-17 14:45:58 +02:00
Gina Häußge
1d98135f58 New hook "octoprint.filemanager.extension_tree"
Allows extending the list of supported file extensions for the file manager.

See also discussion on #850
2015-04-16 13:09:05 +02:00
Gina Häußge
8ac375fc9b Some minor changes before merging the PR
* moved virtual printer into plugin
  * made default serial factory use supplied parameters instead of directly utilizing self._port and similar
  * documented new hook
2015-04-16 11:43:30 +02:00
Gina Häußge
b61996c761 __plugin_init__ => __plugin_load__ 2015-04-14 18:01:17 +02:00
Gina Häußge
2aa31024e6 Finalizing first version of plugin lifecycle management 2015-04-14 17:55:46 +02:00
Gina Häußge
8a41cef00b [Doc] Restructured the plugins section so it makes more sense 2015-03-31 20:08:32 +02:00
Gina Häußge
5c228e6071 [Doc] Big overhaul of TemplatePlugin docs & component ordering 2015-03-31 18:23:18 +02:00
Gina Häußge
8ff0096eb6 Fix & Docs: Plugins may only have one mixin implementation
Multiple mixins are allowed of course. Allowing multiple implementations lead to too many problems due to plugin names for referring to the APIs of SimpleApiPlugins or the assets of AssetPlugins.

 Hence __plugin_implementations__ has been deprecated in favor of __plugin_implementation__. The plugin subsystem will automatically copy the first implementation from __plugin_implementations__ to __plugin_implementation__ and log a deprecation warning.

 Adjusted documentation accordingly. Also added docs for helpers.
2015-03-30 16:50:06 +02:00
Gina Häußge
fb2719ce8a [Doc] let's see if moving the figures out of the tables solves the PDF issue 2015-03-26 10:55:51 +01:00
Gina Häußge
94b207257e [Doc] ok, that was not it, reverting and trying something else 2015-03-26 10:24:33 +01:00
Gina Häußge
45bf398494 [Docs] Added an example for octoprint.comm.protocol.action handler
Used same example to illustrate hook handlers within mixin implementations.
2015-03-25 19:30:49 +01:00
Gina Häußge
7bba22c5d2 [Doc] Include example for octoprint.comm.protocol.scripts hook 2015-03-25 18:45:32 +01:00
Gina Häußge
c6e4057add [Docs] Documented octoprint.comm.protocol.gcode hook
Experimenting with including examples stored on github, let's see if RTD likes that.
2015-03-25 18:24:51 +01:00
Gina Häußge
b3739c10cc [Docs] Started documenting plugin hooks and core concepts. 2015-03-25 09:39:25 +01:00
Gina Häußge
d447308ef0 Even more documentation of the internal modules 2015-03-06 01:42:49 +01:00
Gina Häußge
cd3ead3f30 More documentation 2015-02-27 20:28:24 +01:00
Gina Häußge
543b8df48b Extended documentation to include replace feature for plugin template components 2015-02-24 09:29:02 +01:00
Gina Häußge
8b4b5fb058 Documented slightly changed view model registration
Still backwards compatible though!
2015-02-23 14:00:14 +01:00
Gina Häußge
7de90e16f6 And of course I forgot a file again and overlooked a typo... 2015-02-12 13:34:57 +01:00