Skip to content

Commit

Permalink
feat: Add Plugin System Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Nov 4, 2023
1 parent cf5787c commit 82064f8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
26 changes: 26 additions & 0 deletions vitepress/docs/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,29 @@
title: Pot
titleTemplate: 插件系统
---

# 插件系统

软件内置接口数量有限,但是您可以通过插件系统来扩展软件的功能。

## 插件安装

你可以在 [pot-app-plugin-list](https://github.com/pot-app/pot-app-plugin-list) 仓库查找你需要的插件,然后前往插件仓库下载插件。

pot 插件的扩展名为 `.potext`, 下载得到`.potext`文件之后, 在 `偏好设置-服务设置-添加外部插件-安装外部插件` 选择对应的 `.potext` 即可安装成功,添加到服务列表中即可像内置服务一样正常使用了。

:::warning 故障排除

- 找不到指定的模块 (Windows)

出现类似这样的报错是因为系统缺少 C++库,前往[这里](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022)安装即可解决问题。

- 不是有效的 Win32 应用程序 (Windows)

出现类似这样的报错说明你没有下载对应系统或者架构的插件,前往插件仓库下载正确的插件即可解决问题。

:::

## 插件开发

[pot-app-plugin-list](https://github.com/pot-app/pot-app-plugin-list) 仓库中的 [模板](https://github.com/pot-app/pot-app-plugin-list/blob/main/README.md#%E6%A8%A1%E6%9D%BF) 章节提供了各种插件的开发模板,具体的开发文档请查看对应的模板仓库。
2 changes: 1 addition & 1 deletion vitepress/en/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ brew upgrade --cask pot
:::warning Troubleshooting

- In the latest version of [Webkit2Gtk](https://archlinux.org/packages/extra/x86_64/webkit2gtk) (2.42.0), due to incomplete implementation of DMABUF by Nvidia proprietary drivers, there may be issues with startup failure and crashes. If you encounter a "Segmentation fault" or Pot fails to start, please try adding the environment variable `WEBKIT_DISABLE_DMABUF_RENDERER=1` in `/etc/environment` (or any other place where environment variables can be set) to disable the use of DMABUF.
- Wayland users are unable to use application-specific shortcuts. Please refer to the documentation on [setting system shortcuts](/docs/config/hotkey).
- Wayland users are unable to use application-specific shortcuts. Please refer to the documentation on [setting system shortcuts](/en/docs/config/hotkey).

:::

Expand Down
26 changes: 26 additions & 0 deletions vitepress/en/docs/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,29 @@
title: Pot
titleTemplate: Plugin System
---

# Plugin System

The built-in services are limited. But you can expand the app's functionality through the plugin system.

## Install Plugin

You can find plugins you need in the [pot-app-plugin-list](https://github.com/pot-app/pot-app-plugin-list) repo, and then go to the plugin repo to download it.

The file extension of pot plugin is `.potext`. After downloading the `.potext` file, go to `Config - Service Settings - Add Extension - Install Plugin` to select the corresponding `.potext` to install it. It will then be added to the service list and can be used like a built-in service.

:::warning Troubleshooting

- The specified module could not be found (Windows)

Errors like this occur because the system lacks C++ libraries,Go to [here](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) download and install it.

- Not a valid Win32 application (Windows)

An error like this indicates that you did not download the plugin for the corresponding system or architecture. Go to the plugin repository and download the correct plugin to solve the problem.

:::

## Develop Plugin

The [Template](https://github.com/pot-app/pot-app-plugin-list/blob/main/README_EN.md#template) section in the [pot-app-plugin-list](https://github.com/pot-app/pot-app-plugin-list) repo provides plugin development templates for various plugins. Please check the corresponding template repo for specific documentation.

0 comments on commit 82064f8

Please sign in to comment.