<h1 align="center">NoneBot Plugin EpicFree</h1></br>
<p align="center">🤖 用于获取 Epic 限免游戏资讯的 NoneBot2 插件</p></br>
<p align="center">
<a href="https://github.com/monsterxcn/nonebot_plugin_epicfree/actions">
<img src="https://img.shields.io/github/actions/workflow/status/monsterxcn/nonebot_plugin_epicfree/publish.yml?branch=main&style=flat-square" alt="actions">
</a>
<a href="https://raw.githubusercontent.com/monsterxcn/nonebot_plugin_epicfree/master/LICENSE">
<img src="https://img.shields.io/github/license/monsterxcn/nonebot_plugin_epicfree?style=flat-square" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot_plugin_epicfree">
<img src="https://img.shields.io/pypi/v/nonebot_plugin_epicfree?style=flat-square" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue?style=flat-square" alt="python"><br />
</p></br>
**安装方法**
使用以下命令之一快速安装(若配置了 PyPI 镜像,你可能无法及时检索到插件最新版本):
``` zsh
nb plugin install nonebot_plugin_epicfree
pip install --upgrade nonebot_plugin_epicfree
```
重启 Bot 即可体验此插件。
<details><summary><i>关于 NoneBot2 及相关依赖版本</i></summary></br>
在已淘汰的 NoneBot2 适配器 [nonebot-adapter-cqhttp](https://pypi.org/project/nonebot-adapter-cqhttp/) 下,切记不要使用 `pip` 或 `nb_cli` 安装此插件。通过拷贝文件夹 `nonebot_plugin_epicfree` 至 NoneBot2 插件目录、手动安装 `nonebot-plugin-apscheduler` 和 `httpx` 依赖的方式仍可正常启用此插件。在未来某个版本会完全移除该适配器支持,请尽快升级至 [nonebot-adapter-onebot](https://pypi.org/project/nonebot-adapter-onebot/)。
</details>
<details><summary><i>关于 go-cqhttp 版本</i></summary></br>
插件发送消息依赖 [@Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 的合并转发接口,如需启用私聊响应请务必安装 [v1.0.0-rc2](https://github.com/Mrs4s/go-cqhttp/releases/tag/v1.0.0-rc2) 以上版本的 go-cqhttp。
</details>
**使用方法**
```python
# nonebot_plugin_epicfree/__init__.py#L27
epic_matcher = on_regex(r"^(epic)?喜(加|\+|+)(一|1)$", priority=2, flags=IGNORECASE)
# nonebot_plugin_epicfree/__init__.py#L39
sub_matcher = on_regex(r"^喜(加|\+|+)(一|1)(私聊)?订阅(删除|取消)?$", priority=1)
```
- 发送「喜加一」查找限免游戏
- 发送「喜加一订阅」订阅游戏资讯
- 发送「喜加一订阅删除」取消订阅游戏资讯
*\* 插件响应基于正则匹配,所以,甚至「EpIc喜+1」这样的指令都可用!*
**环境变量**
```
RESOURCES_DIR="/data/bot/resources"
EPIC_SCHEDULER="8 8 8"
```
限免游戏资讯订阅功能默认在机器人根目录下 `/data/epicfree` 文件夹内生成配置文件。定义 `RESOURCES_DIR` 环境变量即可指定用于存放订阅配置的文件夹,填写包含 `epicfree` 文件夹的 **父级文件夹** 路径即可。如果是 Windows 系统应写成类似 `D:/path/to/resources_dir` 的格式。
限免游戏资讯订阅默认 08:08:08 发送(如果当天的游戏已经推送过则不产生推送),定义 `EPIC_SCHEDULER` 环境变量即可指定推送时间,该配置的三个数字依次代表 `hour` `minute` `second`。
**特别鸣谢**
[@nonebot/nonebot2](https://github.com/nonebot/nonebot2/) | [@Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) | [@DIYgod/RSSHub](https://github.com/DIYgod/RSSHub) | [@SD4RK/epicstore_api](https://github.com/SD4RK/epicstore_api)
> 作者是 NoneBot2 新手,代码写的较为粗糙,欢迎提出修改意见或加入此插件开发!溜了溜了...
Raw data
{
"_id": null,
"home_page": "https://github.com/monsterxcn/nonebot_plugin_epicfree",
"name": "nonebot-plugin-epicfree",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "nonebot,nonebot2,epic,free",
"author": "monsterxcn",
"author_email": "monsterxcn@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/06/f4/7a4e901f4d86a2b76cae27a010706c2d294b0f7f50d222cc9eb78a6aa1c8/nonebot_plugin_epicfree-0.2.6.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">NoneBot Plugin EpicFree</h1></br>\n\n\n<p align=\"center\">\ud83e\udd16 \u7528\u4e8e\u83b7\u53d6 Epic \u9650\u514d\u6e38\u620f\u8d44\u8baf\u7684 NoneBot2 \u63d2\u4ef6</p></br>\n\n\n<p align=\"center\">\n <a href=\"https://github.com/monsterxcn/nonebot_plugin_epicfree/actions\">\n <img src=\"https://img.shields.io/github/actions/workflow/status/monsterxcn/nonebot_plugin_epicfree/publish.yml?branch=main&style=flat-square\" alt=\"actions\">\n </a>\n <a href=\"https://raw.githubusercontent.com/monsterxcn/nonebot_plugin_epicfree/master/LICENSE\">\n <img src=\"https://img.shields.io/github/license/monsterxcn/nonebot_plugin_epicfree?style=flat-square\" alt=\"license\">\n </a>\n <a href=\"https://pypi.python.org/pypi/nonebot_plugin_epicfree\">\n <img src=\"https://img.shields.io/pypi/v/nonebot_plugin_epicfree?style=flat-square\" alt=\"pypi\">\n </a>\n <img src=\"https://img.shields.io/badge/python-3.8+-blue?style=flat-square\" alt=\"python\"><br />\n</p></br>\n\n\n**\u5b89\u88c5\u65b9\u6cd5**\n\n\n\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4e4b\u4e00\u5feb\u901f\u5b89\u88c5\uff08\u82e5\u914d\u7f6e\u4e86 PyPI \u955c\u50cf\uff0c\u4f60\u53ef\u80fd\u65e0\u6cd5\u53ca\u65f6\u68c0\u7d22\u5230\u63d2\u4ef6\u6700\u65b0\u7248\u672c\uff09\uff1a\n\n\n``` zsh\nnb plugin install nonebot_plugin_epicfree\n\npip install --upgrade nonebot_plugin_epicfree\n```\n\n\n\u91cd\u542f Bot \u5373\u53ef\u4f53\u9a8c\u6b64\u63d2\u4ef6\u3002\n\n\n<details><summary><i>\u5173\u4e8e NoneBot2 \u53ca\u76f8\u5173\u4f9d\u8d56\u7248\u672c</i></summary></br>\n\n\n\u5728\u5df2\u6dd8\u6c70\u7684 NoneBot2 \u9002\u914d\u5668 [nonebot-adapter-cqhttp](https://pypi.org/project/nonebot-adapter-cqhttp/) \u4e0b\uff0c\u5207\u8bb0\u4e0d\u8981\u4f7f\u7528 `pip` \u6216 `nb_cli` \u5b89\u88c5\u6b64\u63d2\u4ef6\u3002\u901a\u8fc7\u62f7\u8d1d\u6587\u4ef6\u5939 `nonebot_plugin_epicfree` \u81f3 NoneBot2 \u63d2\u4ef6\u76ee\u5f55\u3001\u624b\u52a8\u5b89\u88c5 `nonebot-plugin-apscheduler` \u548c `httpx` \u4f9d\u8d56\u7684\u65b9\u5f0f\u4ecd\u53ef\u6b63\u5e38\u542f\u7528\u6b64\u63d2\u4ef6\u3002\u5728\u672a\u6765\u67d0\u4e2a\u7248\u672c\u4f1a\u5b8c\u5168\u79fb\u9664\u8be5\u9002\u914d\u5668\u652f\u6301\uff0c\u8bf7\u5c3d\u5feb\u5347\u7ea7\u81f3 [nonebot-adapter-onebot](https://pypi.org/project/nonebot-adapter-onebot/)\u3002\n\n\n</details>\n\n\n<details><summary><i>\u5173\u4e8e go-cqhttp \u7248\u672c</i></summary></br>\n\n\n\u63d2\u4ef6\u53d1\u9001\u6d88\u606f\u4f9d\u8d56 [@Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) \u7684\u5408\u5e76\u8f6c\u53d1\u63a5\u53e3\uff0c\u5982\u9700\u542f\u7528\u79c1\u804a\u54cd\u5e94\u8bf7\u52a1\u5fc5\u5b89\u88c5 [v1.0.0-rc2](https://github.com/Mrs4s/go-cqhttp/releases/tag/v1.0.0-rc2) \u4ee5\u4e0a\u7248\u672c\u7684 go-cqhttp\u3002\n\n\n</details>\n\n\n**\u4f7f\u7528\u65b9\u6cd5**\n\n\n```python\n# nonebot_plugin_epicfree/__init__.py#L27\nepic_matcher = on_regex(r\"^(epic)?\u559c(\u52a0|\\+|\uff0b)(\u4e00|1)$\", priority=2, flags=IGNORECASE)\n\n# nonebot_plugin_epicfree/__init__.py#L39\nsub_matcher = on_regex(r\"^\u559c(\u52a0|\\+|\uff0b)(\u4e00|1)(\u79c1\u804a)?\u8ba2\u9605(\u5220\u9664|\u53d6\u6d88)?$\", priority=1)\n```\n\n\n - \u53d1\u9001\u300c\u559c\u52a0\u4e00\u300d\u67e5\u627e\u9650\u514d\u6e38\u620f\n - \u53d1\u9001\u300c\u559c\u52a0\u4e00\u8ba2\u9605\u300d\u8ba2\u9605\u6e38\u620f\u8d44\u8baf\n - \u53d1\u9001\u300c\u559c\u52a0\u4e00\u8ba2\u9605\u5220\u9664\u300d\u53d6\u6d88\u8ba2\u9605\u6e38\u620f\u8d44\u8baf\n\n\n*\\* \u63d2\u4ef6\u54cd\u5e94\u57fa\u4e8e\u6b63\u5219\u5339\u914d\uff0c\u6240\u4ee5\uff0c\u751a\u81f3\u300cEpIc\u559c+1\u300d\u8fd9\u6837\u7684\u6307\u4ee4\u90fd\u53ef\u7528\uff01*\n\n\n**\u73af\u5883\u53d8\u91cf**\n\n\n```\nRESOURCES_DIR=\"/data/bot/resources\"\nEPIC_SCHEDULER=\"8 8 8\"\n```\n\n\n\u9650\u514d\u6e38\u620f\u8d44\u8baf\u8ba2\u9605\u529f\u80fd\u9ed8\u8ba4\u5728\u673a\u5668\u4eba\u6839\u76ee\u5f55\u4e0b `/data/epicfree` \u6587\u4ef6\u5939\u5185\u751f\u6210\u914d\u7f6e\u6587\u4ef6\u3002\u5b9a\u4e49 `RESOURCES_DIR` \u73af\u5883\u53d8\u91cf\u5373\u53ef\u6307\u5b9a\u7528\u4e8e\u5b58\u653e\u8ba2\u9605\u914d\u7f6e\u7684\u6587\u4ef6\u5939\uff0c\u586b\u5199\u5305\u542b `epicfree` \u6587\u4ef6\u5939\u7684 **\u7236\u7ea7\u6587\u4ef6\u5939** \u8def\u5f84\u5373\u53ef\u3002\u5982\u679c\u662f Windows \u7cfb\u7edf\u5e94\u5199\u6210\u7c7b\u4f3c `D:/path/to/resources_dir` \u7684\u683c\u5f0f\u3002\n\n\u9650\u514d\u6e38\u620f\u8d44\u8baf\u8ba2\u9605\u9ed8\u8ba4 08:08:08 \u53d1\u9001\uff08\u5982\u679c\u5f53\u5929\u7684\u6e38\u620f\u5df2\u7ecf\u63a8\u9001\u8fc7\u5219\u4e0d\u4ea7\u751f\u63a8\u9001\uff09\uff0c\u5b9a\u4e49 `EPIC_SCHEDULER` \u73af\u5883\u53d8\u91cf\u5373\u53ef\u6307\u5b9a\u63a8\u9001\u65f6\u95f4\uff0c\u8be5\u914d\u7f6e\u7684\u4e09\u4e2a\u6570\u5b57\u4f9d\u6b21\u4ee3\u8868 `hour` `minute` `second`\u3002\n\n\n**\u7279\u522b\u9e23\u8c22**\n\n\n[@nonebot/nonebot2](https://github.com/nonebot/nonebot2/) | [@Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) | [@DIYgod/RSSHub](https://github.com/DIYgod/RSSHub) | [@SD4RK/epicstore_api](https://github.com/SD4RK/epicstore_api)\n\n\n> \u4f5c\u8005\u662f NoneBot2 \u65b0\u624b\uff0c\u4ee3\u7801\u5199\u7684\u8f83\u4e3a\u7c97\u7cd9\uff0c\u6b22\u8fce\u63d0\u51fa\u4fee\u6539\u610f\u89c1\u6216\u52a0\u5165\u6b64\u63d2\u4ef6\u5f00\u53d1\uff01\u6e9c\u4e86\u6e9c\u4e86...\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "EpicGameStore free games promotions plugin for NoneBot2",
"version": "0.2.6",
"project_urls": {
"Documentation": "https://github.com/monsterxcn/nonebot_plugin_epicfree#readme",
"Homepage": "https://github.com/monsterxcn/nonebot_plugin_epicfree"
},
"split_keywords": [
"nonebot",
"nonebot2",
"epic",
"free"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7fa36e1bb8d02d376e1a8487d47e960b549265919d490f99219fea0e704e6636",
"md5": "25b074c6180cf6d7d2a8f8f969638c2e",
"sha256": "bdeaa8cdffe6df36d894106e4b357a7452842888a572da4c4bd5390907b84315"
},
"downloads": -1,
"filename": "nonebot_plugin_epicfree-0.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25b074c6180cf6d7d2a8f8f969638c2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 8165,
"upload_time": "2023-10-30T07:57:15",
"upload_time_iso_8601": "2023-10-30T07:57:15.417775Z",
"url": "https://files.pythonhosted.org/packages/7f/a3/6e1bb8d02d376e1a8487d47e960b549265919d490f99219fea0e704e6636/nonebot_plugin_epicfree-0.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "06f47a4e901f4d86a2b76cae27a010706c2d294b0f7f50d222cc9eb78a6aa1c8",
"md5": "ae0a6f9c30eabeba0b83dcfb83669498",
"sha256": "29f28602a936a3e42cc2a1ed0525447b2877aebb85a1a3a36e4326c80869abf5"
},
"downloads": -1,
"filename": "nonebot_plugin_epicfree-0.2.6.tar.gz",
"has_sig": false,
"md5_digest": "ae0a6f9c30eabeba0b83dcfb83669498",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 7049,
"upload_time": "2023-10-30T07:57:17",
"upload_time_iso_8601": "2023-10-30T07:57:17.048613Z",
"url": "https://files.pythonhosted.org/packages/06/f4/7a4e901f4d86a2b76cae27a010706c2d294b0f7f50d222cc9eb78a6aa1c8/nonebot_plugin_epicfree-0.2.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-30 07:57:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "monsterxcn",
"github_project": "nonebot_plugin_epicfree",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-epicfree"
}