<div align="center">
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
<br>
<p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>
<div align="center">
# nonebot-plugin-savepic
_✨ 一个存取图片的插件 ✨_
## 📖 介绍
重写自 Fran 的 Savepic
### savepic
保存表情包
### randpic
抽取表情包
### mvpic
重命名表情包,或者修改表情包所属的群域
例如:
```
/mvpic -l name.jpg -g waaaaa.gif
```
就是把本群的 name.jpg 改成全局名为 waaaaa.gif 的表情包
同理
```
/mvpic -g waaaaa.gif -l waaaaa.gif
```
就是从全局移到本群(接收到命令的群)
### 直接发送文件名
发送文件名即可发送表情包
## 💿 安装
<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-savepic
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
pip install nonebot-plugin-savepic
</details>
<details>
<summary>pdm</summary>
pdm add nonebot-plugin-savepic
</details>
<details>
<summary>poetry</summary>
poetry add nonebot-plugin-savepic
</details>
<details>
<summary>conda</summary>
conda install nonebot-plugin-savepic
</details>
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
plugins = ["nonebot_plugin_savepic"]
</details>
## ⚙️ 配置
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|:-----:|:----:|:----:|:----:|
| savepic_admin | 否 | 无 | 权限用户 |
| savepic_dir | 否 | savepic | 图片本地保存位置 |
| simpic_enable | 否 | False | 是否开启基于RNN模型的AI相似度检索功能,如果开启要填写 Pinecone 相关配置 |
| pinecone_apikey | 否 | 无 | pinecone 的 Key |
| pinecone_environment | 否 | 无 | pinecone 的 enviroment,是数据库的属性之一 |
| pinecone_index | 否 | savepic | 同上。 |
| dashscope_api | 否 | 无 | dashscope 的 APIKey。 用于开启基于语义的相似度检索功能 |
## 🎉 使用
### 指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|:-----:|:----:|:----:|:----:|:----:|
| savepic | 群员 | 否 | 群聊 | 保存图片 |
| randpic | 群员 | 否 | 全部 | 随机图片 |
| mvpic | 管理员 | 否 | 群聊 | 重命名图片 |
Raw data
{
"_id": null,
"home_page": "https://github.com/Yan-Zero/nonebot-plugin-savepic",
"name": "nonebot-plugin-savepic",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Yan",
"author_email": "1964649083@qq.com",
"download_url": "https://files.pythonhosted.org/packages/06/21/3982eb12f808fc821f11625f04190cb88ffc8613a0cda4c2e74f734b40fc/nonebot_plugin_savepic-0.3.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n <br>\n <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-savepic\n\n_\u2728 \u4e00\u4e2a\u5b58\u53d6\u56fe\u7247\u7684\u63d2\u4ef6 \u2728_\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\n\u91cd\u5199\u81ea Fran \u7684 Savepic\n\n### savepic\n\n\u4fdd\u5b58\u8868\u60c5\u5305\n\n### randpic\n\n\u62bd\u53d6\u8868\u60c5\u5305\n\n### mvpic\n\n\u91cd\u547d\u540d\u8868\u60c5\u5305\uff0c\u6216\u8005\u4fee\u6539\u8868\u60c5\u5305\u6240\u5c5e\u7684\u7fa4\u57df\n\n\u4f8b\u5982\uff1a\n```\n/mvpic -l name.jpg -g waaaaa.gif\n```\n\u5c31\u662f\u628a\u672c\u7fa4\u7684 name.jpg \u6539\u6210\u5168\u5c40\u540d\u4e3a waaaaa.gif \u7684\u8868\u60c5\u5305\n\n\u540c\u7406\n```\n/mvpic -g waaaaa.gif -l waaaaa.gif\n```\n\u5c31\u662f\u4ece\u5168\u5c40\u79fb\u5230\u672c\u7fa4\uff08\u63a5\u6536\u5230\u547d\u4ee4\u7684\u7fa4\uff09\n\n### \u76f4\u63a5\u53d1\u9001\u6587\u4ef6\u540d\n\n\u53d1\u9001\u6587\u4ef6\u540d\u5373\u53ef\u53d1\u9001\u8868\u60c5\u5305\n\n\n## \ud83d\udcbf \u5b89\u88c5\n\n<details open>\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n nb plugin install nonebot-plugin-savepic\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4\n\n<details>\n<summary>pip</summary>\n\n pip install nonebot-plugin-savepic\n</details>\n<details>\n<summary>pdm</summary>\n\n pdm add nonebot-plugin-savepic\n</details>\n<details>\n<summary>poetry</summary>\n\n poetry add nonebot-plugin-savepic\n</details>\n<details>\n<summary>conda</summary>\n\n conda install nonebot-plugin-savepic\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\n\n plugins = [\"nonebot_plugin_savepic\"]\n\n</details>\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u5728 nonebot2 \u9879\u76ee\u7684`.env`\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e0b\u8868\u4e2d\u7684\u5fc5\u586b\u914d\u7f6e\n\n| \u914d\u7f6e\u9879 | \u5fc5\u586b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n|:-----:|:----:|:----:|:----:|\n| savepic_admin | \u5426 | \u65e0 | \u6743\u9650\u7528\u6237 |\n| savepic_dir | \u5426 | savepic | \u56fe\u7247\u672c\u5730\u4fdd\u5b58\u4f4d\u7f6e |\n| simpic_enable | \u5426 | False | \u662f\u5426\u5f00\u542f\u57fa\u4e8eRNN\u6a21\u578b\u7684AI\u76f8\u4f3c\u5ea6\u68c0\u7d22\u529f\u80fd\uff0c\u5982\u679c\u5f00\u542f\u8981\u586b\u5199 Pinecone \u76f8\u5173\u914d\u7f6e |\n| pinecone_apikey | \u5426 | \u65e0 | pinecone \u7684 Key |\n| pinecone_environment | \u5426 | \u65e0 | pinecone \u7684 enviroment\uff0c\u662f\u6570\u636e\u5e93\u7684\u5c5e\u6027\u4e4b\u4e00 |\n| pinecone_index | \u5426 | savepic | \u540c\u4e0a\u3002 |\n| dashscope_api | \u5426 | \u65e0 | dashscope \u7684 APIKey\u3002 \u7528\u4e8e\u5f00\u542f\u57fa\u4e8e\u8bed\u4e49\u7684\u76f8\u4f3c\u5ea6\u68c0\u7d22\u529f\u80fd |\n\n## \ud83c\udf89 \u4f7f\u7528\n### \u6307\u4ee4\u8868\n| \u6307\u4ee4 | \u6743\u9650 | \u9700\u8981@ | \u8303\u56f4 | \u8bf4\u660e |\n|:-----:|:----:|:----:|:----:|:----:|\n| savepic | \u7fa4\u5458 | \u5426 | \u7fa4\u804a | \u4fdd\u5b58\u56fe\u7247 |\n| randpic | \u7fa4\u5458 | \u5426 | \u5168\u90e8 | \u968f\u673a\u56fe\u7247 |\n| mvpic | \u7ba1\u7406\u5458 | \u5426 | \u7fa4\u804a | \u91cd\u547d\u540d\u56fe\u7247 |\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u4fdd\u5b58\u8868\u60c5\u5305\uff08\u8bed\u5f55\uff09\u4e0e\u968f\u673a\u51fa\u56fe",
"version": "0.3.1",
"project_urls": {
"Homepage": "https://github.com/Yan-Zero/nonebot-plugin-savepic"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ecf52fdf0d6a6545582853f121173455ddb3ed762f71c947424e0c60eaa8c78",
"md5": "19becc44be99efa03c69edf18f3c84db",
"sha256": "5a97a8afead49602f99412491be393ea25b4c55d072dfb22fe04c304da788b74"
},
"downloads": -1,
"filename": "nonebot_plugin_savepic-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "19becc44be99efa03c69edf18f3c84db",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.10",
"size": 21869,
"upload_time": "2024-06-10T11:38:35",
"upload_time_iso_8601": "2024-06-10T11:38:35.714105Z",
"url": "https://files.pythonhosted.org/packages/9e/cf/52fdf0d6a6545582853f121173455ddb3ed762f71c947424e0c60eaa8c78/nonebot_plugin_savepic-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "06213982eb12f808fc821f11625f04190cb88ffc8613a0cda4c2e74f734b40fc",
"md5": "787f8e6a689db096f86d9c51482abeb2",
"sha256": "83a31c51a77028f7f7ff425b8578fc83cb0886192c6a183795232cf2d48364de"
},
"downloads": -1,
"filename": "nonebot_plugin_savepic-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "787f8e6a689db096f86d9c51482abeb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.10",
"size": 17319,
"upload_time": "2024-06-10T11:38:37",
"upload_time_iso_8601": "2024-06-10T11:38:37.205194Z",
"url": "https://files.pythonhosted.org/packages/06/21/3982eb12f808fc821f11625f04190cb88ffc8613a0cda4c2e74f734b40fc/nonebot_plugin_savepic-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-10 11:38:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Yan-Zero",
"github_project": "nonebot-plugin-savepic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-savepic"
}