Wox icon indicating copy to clipboard operation
Wox copied to clipboard

How do I create custom backend functions?

Open SashvDave opened this issue 9 months ago • 3 comments

Version

  • [ ] v1 (has no resource to fix)
  • [x] v2

Platform

  • [ ] Macos
  • [ ] Windows
  • [ ] Linux

Description

If I want to create a custom function in python and then call that as an "application" or "command" from the flutter UI, can you walk me through what the steps for that look like, including where I should define the python files, should I create them as an independent script or in a similar structure to these in the plugins folder, how to create and call the command as a query option in the flutter UI, etc.?

Thank you

SashvDave avatar May 04 '24 17:05 SashvDave

Sorry, python plugin is not ready. You can make nodejs plugin for now. If you interested in Nodejs plugin, you can refer DeepL Plugin as an example.

qianlifeng avatar May 05 '24 02:05 qianlifeng

I cloned that repo into my plugins folder. Now how do I run it and make edits and see them in a development environment?

SashvDave avatar May 05 '24 07:05 SashvDave

  1. Go to DeepL Plugin folder and run pnpm run dev

  2. Go to Wox Plugin Manager setting page and add DeepL Plugin folder to the Local Plugin Directories image

  3. Now you can use deep to activate this plugin. when you make any changes to the plugin, Wox should auto reload the plugin and give you notification

qianlifeng avatar May 05 '24 12:05 qianlifeng