这是一个使用 PDM 作为包管理器的 AxTBot 插件项目的模板库, 你可以直接使用本模板创建你的 AxTBot 插件项目的仓库
模板库使用方法
-
点击仓库中的 "Use this template" 按钮, 输入仓库名与描述, 点击 " Create repository from template" 创建仓库
-
在创建好的新仓库中, 在 "Add file" 菜单中选择 "Create new file", 在新文件名处输入
LICENSE, 此时在右侧会出现一个 "Choose a license template" 按钮, 点击此按钮选择开源协议模板, 然后在最下方提交新文件到主分支 -
本地机器首先需要安装 git, python 3.9+ 和 pdm 2.13+
-
克隆你刚刚创建的仓库到本地, 并进入仓库目录, 执行
pdm sync安装虚拟环境与依赖 -
利用编辑器打开仓库目录, 执行以下全局替换操作:
- 全局替换
axtbot-plugin-help为你插件的包名 (用于 pip 安装等) - 全局替换
axtbot_plugin_help为你插件的包名 (用于 python 导入等) - 全局替换
帮助菜单为你插件的可读名 (用于插件商店 等) - 全局替换
该插件为官方插件包之一,通过/help提供帮助菜单为你插件的简单描述 - 全局替换
AxT-Team为你的 github 用户名 - 全局替换
shanshui@shanshui.site为你的邮箱
- 全局替换
-
修改 README 中的插件名和插件描述, 并在下方填充相应的内容
配置发布工作流
模块库中自带了一个发布工作流, 你可以使用此工作流自动发布你的插件到 pypi
- 前往 https://pypi.org/ 并注册一个账号。
- 前往 https://pypi.org/manage/account/publishing/, 下翻到
Pending publishers - 选择
Github选项栏,填写相关信息:- PyPI Project Name: 你的插件包名,如
axtbot-plugin-template - Owner: 你的 Github 用户名
- Repository name: 你的插件仓库名称,如
axtbot-plugin-template - Workflow name: 请填入
release.yml
- PyPI Project Name: 你的插件包名,如
- 点击
Add按钮,完成发布工作流配置
触发发布工作流
- 任意提交后,在 Github 仓库界面点击
Releases选项,点击Create a new release按钮。若没有Release选项,可在仓库主页点击Tags选项,在新界面点击Create a new release按钮 - 点击
Choose a tag,输入以v开头的版本号,如v0.0.1,然后点击Create new tag按钮 - 填写
Release title和Describe this release。或点击Generate release notes自动生成相关信息 - 点击
Publish release按钮,触发发布工作流
介绍
这里是插件的详细介绍部分
安装方法
使用包管理器安装
在项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install axtbot-plugin-help
pdm
pdm add axtbot-plugin-help
poetry
poetry add axtbot-plugin-help
打开项目根目录下的 pyproject.toml 文件, 在 [tool.axtbot] 部分追加写入
plugins = ["axtbot_plugin_help"]
Metadata
Release files for axtbot-plugin-help 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| axtbot_plugin_help-1.0.0.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| axtbot_plugin_help-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / axtbot_plugin_help-1.0.0.tar.gz
| Download URL | axtbot_plugin_help-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7f2ab00e69b0dffe96381abee944e188623d07407617295df945103208709a8
|
|
BLAKE2b-256 checksum How to use checksums |
fa666b49ab8830aaba9b7754a01ba84b2ecb8edbcbd85038c1f5b97e2706a99f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.28.0 CPython/3.12.3 Linux/6.17.0-1020-azure
|
Release files / axtbot_plugin_help-1.0.0-py3-none-any.whl
| Download URL | axtbot_plugin_help-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ddc6a31aa4cc6aeb0b839ae121d76e29caab8cea0c2496798357ad1a39e64af
|
|
BLAKE2b-256 checksum How to use checksums |
b3e62a917546f140ffd4afb46bb78d2997a7fea7a0994bd025f17374062d7384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.28.0 CPython/3.12.3 Linux/6.17.0-1020-azure
|
Security for axtbot-plugin-help 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.