nonebot-plugin-gachalogs


Namenonebot-plugin-gachalogs JSON
Version 0.2.13 PyPI version JSON
download
home_pagehttps://github.com/monsterxcn/nonebot-plugin-gachalogs
SummaryGenshin gacha history analysis plugin for NoneBot2
upload_time2023-07-10 08:08:28
maintainer
docs_urlNone
authormonsterxcn
requires_python>=3.8.1,<4.0
licenseMIT
keywords nonebot nonebot2 genshin gacha
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">NoneBot Plugin GachaLogs</h1></br>


<p align="center">🤖 用于分析与管理原神祈愿记录的 NoneBot2 插件</p></br>


<p align="center">
  <a href="https://raw.githubusercontent.com/monsterxcn/nonebot-plugin-gachalogs/master/LICENSE"><img src="https://img.shields.io/github/license/monsterxcn/nonebot-plugin-gachalogs" alt="license"></a>
  <a href="https://pypi.python.org/pypi/nonebot-plugin-gachalogs"><img src="https://img.shields.io/pypi/v/nonebot-plugin-gachalogs" alt="pypi"></a>
  <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.8+-blue" alt="python" /></a>
  <a href="https://jq.qq.com/?_wv=1027&k=GF2vqPgf"><img src="https://img.shields.io/badge/QQ%E7%BE%A4-662597191-orange" alt="QQ Chat Group" /></a><br />
  <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /></a>
  <a href="https://pycqa.github.io/isort"><img src="https://img.shields.io/badge/%20imports-isort-%231674b1?&labelColor=ef8336" alt="Imports: isort" /></a>
  <a href="https://flake8.pycqa.org/"><img src="https://img.shields.io/badge/lint-flake8-&labelColor=4c9c39" alt="Lint: flake8" /></a>
  <a href="https://results.pre-commit.ci/latest/github/monsterxcn/nonebot-plugin-gachalogs/main"><img src="https://results.pre-commit.ci/badge/github/monsterxcn/nonebot-plugin-gachalogs/main.svg" alt="pre-commit" /></a>
</p></br>


| ![祈愿统计图](https://user-images.githubusercontent.com/22407052/198547014-469865b5-a298-4b91-beb2-645e028a4721.PNG) | ![成就示意图](https://user-images.githubusercontent.com/22407052/210336667-ecb56bcb-42dc-4235-ab17-1e30bea04362.PNG) |
|:--:|:--:|


## 安装方法


如果你正在使用 2.0.0.beta1 以上版本 NoneBot2,推荐使用以下命令安装:


```bash
# 从 nb_cli 安装
nb plugin install nonebot-plugin-gachalogs

# 或从 PyPI 安装
pip install nonebot-plugin-gachalogs
```


## 使用须知


 - 初次使用 `抽卡记录` 命令时,要求输入祈愿历史记录链接或米哈游通行证 Cookie。如果初次使用输入链接(只要回复的内容中含有即可,不必手动截取准确的链接),在该链接的 AuthKey 过期(24 小时)后需要重新输入链接或 Cookie 才能刷新数据。如果初次使用输入 Cookie,只要 Cookie 有效,后续使用时祈愿历史记录链接将自动更新,无需再次输入。
   
 - 插件使用米哈游通行证 Cookie 来自动更新祈愿历史记录链接,该 Cookie 可在 [米哈游通行证](https://user.mihoyo.com/#/login/) 登陆获取,并非一些教程中使用的 [米游社 BBS](https://bbs.mihoyo.com/) Cookie,其中需要包含 `stoken` `stuid` 或 `login_ticket`。
   
   你可以参考 [KimigaiiWuyi/GenshinUID#255](https://github.com/KimigaiiWuyi/GenshinUID/issues/255) 等教程获取米哈游通行证 Cookie。此处提供一种获取该 Cookie 的简便方法:
   
   1. 在桌面端浏览器新建 **隐身标签页**,后面均在此隐身标签页内操作
   2. 进入 https://www.miyoushe.com/ys/ 并正常登录
   3. 进入 http://user.mihoyo.com/ 并正常登录
   4. 按下 F12 键,切换至「Console / 控制台」页面,在输入处(通常由蓝色「>」符号示意)输入 `document.cookie` 回车,控制台中出现的字符串即为插件需要的 Cookie
   
 - 一般来说,插件安装完成后无需设置环境变量,只需重启 Bot 即可开始使用。你也可以在 NoneBot2 当前使用的 `.env` 文件中参考 [.env.example](.env.example) 添加下表给出的环境变量,对插件进行更多配置。环境变量修改后需要重启 Bot 才能生效。
   
   | 环境变量 | 必需 | 默认 | 说明 |
   |:-------|:----:|:-----|:----|
   | `gachalogs_safe_group` | 否 | `[]` | 安全群组,只有在安全群组内才允许输入链接、Cookie 等内容 |
   | `gacha_expire_sec` | 否 | `3600` | 祈愿历史记录本地缓存过期秒数 |
   | `resources_dir` | 否 | `/path/to/bot/data/` | 插件缓存目录的父文件夹,包含 `gachalogs` 文件夹的上级文件夹路径 |
   | `gachalogs_font` | 否 | `/path/to/bot/data/gachalogs/LXGW-Bold.ttf` | 祈愿历史记录绘制字体 |
   | `gachalogs_pie_font` | 否 | `/path/to/bot/data/gachalogs/LXGW-Bold-minipie.ttf` | 祈愿历史记录绘制饼图字体 |
   | `gachalogs_achieve_font` | 否 | `/path/to/bot/data/gachalogs/HYWH-85W.ttf` | 祈愿历史记录绘制成就字体 |
   
 - 在群组中发送米哈游通行证 Cookie 等内容存在安全隐患,因此即使某些命令在群组中触发,处理结果最终也会通过私聊发送。如果用户未添加 Bot 为好友,私聊消息将发送失败。添加安全群组环境变量,即可允许在这些群组中直接发送敏感消息,如果大家不在意的话。
   
 - commit [`e2f38f3`](https://github.com/monsterxcn/nonebot-plugin-gachalogs/commit/e2f38f30379dac4f98f9314fa012a1272c2dcc95) 之后插件私聊文件发送功能不再依赖腾讯云 COS 转存,只需 go-cqhttp 支持 [上传私聊文件](https://docs.go-cqhttp.org/api/#%E4%B8%8A%E4%BC%A0%E7%A7%81%E8%81%8A%E6%96%87%E4%BB%B6) 接口。因此如果有私聊文件发送需求,务必保证 go-cqhttp 版本不低于 [v1.0.0-rc3](https://github.com/Mrs4s/go-cqhttp/releases/tag/v1.0.0-rc3)。
   
 - 使用 `抽卡记录导出` 命令生成的表格与 JSON 文件均符合 [统一可交换祈愿记录标准](https://github.com/DGP-Studio/Snap.Genshin/wiki/StandardFormat)(UIGF)格式,你可以尝试在其他支持此标准的工具中导入。导出的祈愿历史记录链接、米哈游通行证 Cookie 在某些地方也许有用。
   
 - 插件运行后,用户的基本配置信息会写入 `config.json` 文件,祈愿历史记录数据缓存于 `gachalogs-{uid}.json` 文件。


## 命令说明


 - `抽卡记录` / `ckjl`
   
   返回一张祈愿历史记录统计图,样式与 https://genshin.voderl.cn/ 一致。
   
   | 可选附带参数 | 默认 | 说明 |
   |:-----------|:-----|:----|
   | `刷新` / `-f` / `--force` | 空 | 要求强制刷新最新祈愿历史记录,即使本地缓存未过期(结果默认缓存 1 小时) |
   | 祈愿历史记录链接 | 空 | 指定祈愿历史记录链接(仅初次使用、无法自动更新祈愿历史记录链接时生效) |
   | 米哈游通行证 Cookie | 空 | 指定米哈游通行证 Cookie(仅初次使用、无法自动更新祈愿历史记录链接时生效) |
   
 - `抽卡成就` / `ckcj`
   
   返回一张祈愿历史记录成就图,样式与 https://genshin.voderl.cn/ 一致。
   
 - 抽卡记录导入(在私聊或群聊中上传抽卡记录文件)
   
   返回导入结果及一张祈愿历史记录统计图。
   
   普通用户只允许导入与本地记录(如果有)归属 UID 相同的抽卡记录。超级用户在普通用户规则基础上,还允许为拥有本地记录的其他用户导入 UID 相同的抽卡记录。
   
   目前支持导入的文件格式有:
   
   + 程序内部缓存格式。导入后执行恢复,即将本地记录直接替换为该文件的记录
   + UIGF v2.2 格式,并且每条记录必须拥有 `time` `rank_type` 等 UIGF v2.2 标准中定义为非必需的字段。导入后执行合并,即尝试将本地记录与该文件的记录合并
   
   如果导入前 *被导入者* 有本地记录,插件会创建一个本地记录备份文件用于意外恢复,并尝试通过私聊将此文件发送给 *被导入者*(如果发送成功则 Bot 在服务器上创建的备份文件会被删除)。一旦发现插件导入后记录异常,*被导入者* 可以直接发送此文件给 Bot 来触发记录恢复。
   
 - `抽卡记录导出` / `logexp` / `ckjldc`
   
   导出祈愿历史记录表格,通过可选附带参数指定导出祈愿历史记录 JSON 文件、祈愿历史记录链接或米哈游通行证 Cookie。
   
   | 可选附带参数 | 默认 | 说明 |
   |:-----------|:-----|:----|
   | @某人 | **@自己** | 指定导出记录用户,仅 **Bot 管理员** 可导出其他用户的记录 |
   | `统一` / `标准` / `uigf` / `json` | 空 | 指定导出祈愿历史记录为 JSON 文件 |
   | `链接` / `地址` / `url` | 空 | 指定导出祈愿历史记录链接 |
   | `饼干` / `ck` / `cookie` | 空 | 指定导出米哈游通行证 Cookie |
   
   ![导出示意图](https://user-images.githubusercontent.com/22407052/187933780-64fa0be4-a43f-40f1-9fa9-88e033e9d372.png)
   
 - `抽卡记录删除` / `logdel` / `ckjldc`
   
   默认只删除本地祈愿历史记录缓存(不会影响 Cookie 等配置数据),即只删除 `gachalogs-{uid}.json` 文件。
   
   如果需要连同指定用户在 `config.json` 文件中的配置一起删除,请使用附带参数 `全部` 等。
   
   记录、配置一旦删除将无法恢复,所以只有输入中附带了 `确认` 等附带参数时,命令才会真正对本地文件执行删除动作。
   
   | 可选附带参数 | 默认 | 说明 |
   |:-----------|:-----|:----|
   | @某人 | **@自己** | 指定删除记录或配置的用户,仅 **Bot 管理员** 可删除其他用户的记录或配置 |
   | `强制` / `确认` / `force` / `-f` / `-y` | 空 | 删除操作确认 |
   | `全部` / `所有` / `配置` / `all` / `-a` / `config` / `-c` | 空 | 指定删除用户的 **配置和记录** 全部数据 |


## 特别鸣谢


[@nonebot/nonebot2](https://github.com/nonebot/nonebot2/) | [@Mrs4s/go-cqhttp](https://github.com/Mrs4s/go-cqhttp) | **[@sunfkny/genshin-gacha-export](https://github.com/sunfkny/genshin-gacha-export)** | **[@voderl/genshin-gacha-analyzer](https://github.com/voderl/genshin-gacha-analyzer)** | [@vikiboss/genshin-helper](https://github.com/vikiboss/genshin-helper) | [@DGP-Studio/Snap.Metadata](https://github.com/DGP-Studio/Snap.Metadata)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/monsterxcn/nonebot-plugin-gachalogs",
    "name": "nonebot-plugin-gachalogs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0",
    "maintainer_email": "",
    "keywords": "nonebot,nonebot2,genshin,gacha",
    "author": "monsterxcn",
    "author_email": "monsterxcn@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/40/0f/442721b8cad6973f5be9448c6d8fe5793efa8fac6079e9fb686c3bd73b1e/nonebot_plugin_gachalogs-0.2.13.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">NoneBot Plugin GachaLogs</h1></br>\n\n\n<p align=\"center\">\ud83e\udd16 \u7528\u4e8e\u5206\u6790\u4e0e\u7ba1\u7406\u539f\u795e\u7948\u613f\u8bb0\u5f55\u7684 NoneBot2 \u63d2\u4ef6</p></br>\n\n\n<p align=\"center\">\n  <a href=\"https://raw.githubusercontent.com/monsterxcn/nonebot-plugin-gachalogs/master/LICENSE\"><img src=\"https://img.shields.io/github/license/monsterxcn/nonebot-plugin-gachalogs\" alt=\"license\"></a>\n  <a href=\"https://pypi.python.org/pypi/nonebot-plugin-gachalogs\"><img src=\"https://img.shields.io/pypi/v/nonebot-plugin-gachalogs\" alt=\"pypi\"></a>\n  <a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/python-3.8+-blue\" alt=\"python\" /></a>\n  <a href=\"https://jq.qq.com/?_wv=1027&k=GF2vqPgf\"><img src=\"https://img.shields.io/badge/QQ%E7%BE%A4-662597191-orange\" alt=\"QQ Chat Group\" /></a><br />\n  <a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code style: black\" /></a>\n  <a href=\"https://pycqa.github.io/isort\"><img src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?&labelColor=ef8336\" alt=\"Imports: isort\" /></a>\n  <a href=\"https://flake8.pycqa.org/\"><img src=\"https://img.shields.io/badge/lint-flake8-&labelColor=4c9c39\" alt=\"Lint: flake8\" /></a>\n  <a href=\"https://results.pre-commit.ci/latest/github/monsterxcn/nonebot-plugin-gachalogs/main\"><img src=\"https://results.pre-commit.ci/badge/github/monsterxcn/nonebot-plugin-gachalogs/main.svg\" alt=\"pre-commit\" /></a>\n</p></br>\n\n\n| ![\u7948\u613f\u7edf\u8ba1\u56fe](https://user-images.githubusercontent.com/22407052/198547014-469865b5-a298-4b91-beb2-645e028a4721.PNG) | ![\u6210\u5c31\u793a\u610f\u56fe](https://user-images.githubusercontent.com/22407052/210336667-ecb56bcb-42dc-4235-ab17-1e30bea04362.PNG) |\n|:--:|:--:|\n\n\n## \u5b89\u88c5\u65b9\u6cd5\n\n\n\u5982\u679c\u4f60\u6b63\u5728\u4f7f\u7528 2.0.0.beta1 \u4ee5\u4e0a\u7248\u672c NoneBot2\uff0c\u63a8\u8350\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a\n\n\n```bash\n# \u4ece nb_cli \u5b89\u88c5\nnb plugin install nonebot-plugin-gachalogs\n\n# \u6216\u4ece PyPI \u5b89\u88c5\npip install nonebot-plugin-gachalogs\n```\n\n\n## \u4f7f\u7528\u987b\u77e5\n\n\n - \u521d\u6b21\u4f7f\u7528 `\u62bd\u5361\u8bb0\u5f55` \u547d\u4ee4\u65f6\uff0c\u8981\u6c42\u8f93\u5165\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u6216\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie\u3002\u5982\u679c\u521d\u6b21\u4f7f\u7528\u8f93\u5165\u94fe\u63a5\uff08\u53ea\u8981\u56de\u590d\u7684\u5185\u5bb9\u4e2d\u542b\u6709\u5373\u53ef\uff0c\u4e0d\u5fc5\u624b\u52a8\u622a\u53d6\u51c6\u786e\u7684\u94fe\u63a5\uff09\uff0c\u5728\u8be5\u94fe\u63a5\u7684 AuthKey \u8fc7\u671f\uff0824 \u5c0f\u65f6\uff09\u540e\u9700\u8981\u91cd\u65b0\u8f93\u5165\u94fe\u63a5\u6216 Cookie \u624d\u80fd\u5237\u65b0\u6570\u636e\u3002\u5982\u679c\u521d\u6b21\u4f7f\u7528\u8f93\u5165 Cookie\uff0c\u53ea\u8981 Cookie \u6709\u6548\uff0c\u540e\u7eed\u4f7f\u7528\u65f6\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u5c06\u81ea\u52a8\u66f4\u65b0\uff0c\u65e0\u9700\u518d\u6b21\u8f93\u5165\u3002\n   \n - \u63d2\u4ef6\u4f7f\u7528\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie \u6765\u81ea\u52a8\u66f4\u65b0\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\uff0c\u8be5 Cookie \u53ef\u5728 [\u7c73\u54c8\u6e38\u901a\u884c\u8bc1](https://user.mihoyo.com/#/login/) \u767b\u9646\u83b7\u53d6\uff0c\u5e76\u975e\u4e00\u4e9b\u6559\u7a0b\u4e2d\u4f7f\u7528\u7684 [\u7c73\u6e38\u793e BBS](https://bbs.mihoyo.com/) Cookie\uff0c\u5176\u4e2d\u9700\u8981\u5305\u542b `stoken` `stuid` \u6216 `login_ticket`\u3002\n   \n   \u4f60\u53ef\u4ee5\u53c2\u8003 [KimigaiiWuyi/GenshinUID#255](https://github.com/KimigaiiWuyi/GenshinUID/issues/255) \u7b49\u6559\u7a0b\u83b7\u53d6\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie\u3002\u6b64\u5904\u63d0\u4f9b\u4e00\u79cd\u83b7\u53d6\u8be5 Cookie \u7684\u7b80\u4fbf\u65b9\u6cd5\uff1a\n   \n   1. \u5728\u684c\u9762\u7aef\u6d4f\u89c8\u5668\u65b0\u5efa **\u9690\u8eab\u6807\u7b7e\u9875**\uff0c\u540e\u9762\u5747\u5728\u6b64\u9690\u8eab\u6807\u7b7e\u9875\u5185\u64cd\u4f5c\n   2. \u8fdb\u5165 https://www.miyoushe.com/ys/ \u5e76\u6b63\u5e38\u767b\u5f55\n   3. \u8fdb\u5165 http://user.mihoyo.com/ \u5e76\u6b63\u5e38\u767b\u5f55\n   4. \u6309\u4e0b F12 \u952e\uff0c\u5207\u6362\u81f3\u300cConsole / \u63a7\u5236\u53f0\u300d\u9875\u9762\uff0c\u5728\u8f93\u5165\u5904\uff08\u901a\u5e38\u7531\u84dd\u8272\u300c>\u300d\u7b26\u53f7\u793a\u610f\uff09\u8f93\u5165 `document.cookie` \u56de\u8f66\uff0c\u63a7\u5236\u53f0\u4e2d\u51fa\u73b0\u7684\u5b57\u7b26\u4e32\u5373\u4e3a\u63d2\u4ef6\u9700\u8981\u7684 Cookie\n   \n - \u4e00\u822c\u6765\u8bf4\uff0c\u63d2\u4ef6\u5b89\u88c5\u5b8c\u6210\u540e\u65e0\u9700\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u53ea\u9700\u91cd\u542f Bot \u5373\u53ef\u5f00\u59cb\u4f7f\u7528\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728 NoneBot2 \u5f53\u524d\u4f7f\u7528\u7684 `.env` \u6587\u4ef6\u4e2d\u53c2\u8003 [.env.example](.env.example) \u6dfb\u52a0\u4e0b\u8868\u7ed9\u51fa\u7684\u73af\u5883\u53d8\u91cf\uff0c\u5bf9\u63d2\u4ef6\u8fdb\u884c\u66f4\u591a\u914d\u7f6e\u3002\u73af\u5883\u53d8\u91cf\u4fee\u6539\u540e\u9700\u8981\u91cd\u542f Bot \u624d\u80fd\u751f\u6548\u3002\n   \n   | \u73af\u5883\u53d8\u91cf | \u5fc5\u9700 | \u9ed8\u8ba4 | \u8bf4\u660e |\n   |:-------|:----:|:-----|:----|\n   | `gachalogs_safe_group` | \u5426 | `[]` | \u5b89\u5168\u7fa4\u7ec4\uff0c\u53ea\u6709\u5728\u5b89\u5168\u7fa4\u7ec4\u5185\u624d\u5141\u8bb8\u8f93\u5165\u94fe\u63a5\u3001Cookie \u7b49\u5185\u5bb9 |\n   | `gacha_expire_sec` | \u5426 | `3600` | \u7948\u613f\u5386\u53f2\u8bb0\u5f55\u672c\u5730\u7f13\u5b58\u8fc7\u671f\u79d2\u6570 |\n   | `resources_dir` | \u5426 | `/path/to/bot/data/` | \u63d2\u4ef6\u7f13\u5b58\u76ee\u5f55\u7684\u7236\u6587\u4ef6\u5939\uff0c\u5305\u542b `gachalogs` \u6587\u4ef6\u5939\u7684\u4e0a\u7ea7\u6587\u4ef6\u5939\u8def\u5f84 |\n   | `gachalogs_font` | \u5426 | `/path/to/bot/data/gachalogs/LXGW-Bold.ttf` | \u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7ed8\u5236\u5b57\u4f53 |\n   | `gachalogs_pie_font` | \u5426 | `/path/to/bot/data/gachalogs/LXGW-Bold-minipie.ttf` | \u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7ed8\u5236\u997c\u56fe\u5b57\u4f53 |\n   | `gachalogs_achieve_font` | \u5426 | `/path/to/bot/data/gachalogs/HYWH-85W.ttf` | \u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7ed8\u5236\u6210\u5c31\u5b57\u4f53 |\n   \n - \u5728\u7fa4\u7ec4\u4e2d\u53d1\u9001\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie \u7b49\u5185\u5bb9\u5b58\u5728\u5b89\u5168\u9690\u60a3\uff0c\u56e0\u6b64\u5373\u4f7f\u67d0\u4e9b\u547d\u4ee4\u5728\u7fa4\u7ec4\u4e2d\u89e6\u53d1\uff0c\u5904\u7406\u7ed3\u679c\u6700\u7ec8\u4e5f\u4f1a\u901a\u8fc7\u79c1\u804a\u53d1\u9001\u3002\u5982\u679c\u7528\u6237\u672a\u6dfb\u52a0 Bot \u4e3a\u597d\u53cb\uff0c\u79c1\u804a\u6d88\u606f\u5c06\u53d1\u9001\u5931\u8d25\u3002\u6dfb\u52a0\u5b89\u5168\u7fa4\u7ec4\u73af\u5883\u53d8\u91cf\uff0c\u5373\u53ef\u5141\u8bb8\u5728\u8fd9\u4e9b\u7fa4\u7ec4\u4e2d\u76f4\u63a5\u53d1\u9001\u654f\u611f\u6d88\u606f\uff0c\u5982\u679c\u5927\u5bb6\u4e0d\u5728\u610f\u7684\u8bdd\u3002\n   \n - commit [`e2f38f3`](https://github.com/monsterxcn/nonebot-plugin-gachalogs/commit/e2f38f30379dac4f98f9314fa012a1272c2dcc95) \u4e4b\u540e\u63d2\u4ef6\u79c1\u804a\u6587\u4ef6\u53d1\u9001\u529f\u80fd\u4e0d\u518d\u4f9d\u8d56\u817e\u8baf\u4e91 COS \u8f6c\u5b58\uff0c\u53ea\u9700 go-cqhttp \u652f\u6301 [\u4e0a\u4f20\u79c1\u804a\u6587\u4ef6](https://docs.go-cqhttp.org/api/#%E4%B8%8A%E4%BC%A0%E7%A7%81%E8%81%8A%E6%96%87%E4%BB%B6) \u63a5\u53e3\u3002\u56e0\u6b64\u5982\u679c\u6709\u79c1\u804a\u6587\u4ef6\u53d1\u9001\u9700\u6c42\uff0c\u52a1\u5fc5\u4fdd\u8bc1 go-cqhttp \u7248\u672c\u4e0d\u4f4e\u4e8e [v1.0.0-rc3](https://github.com/Mrs4s/go-cqhttp/releases/tag/v1.0.0-rc3)\u3002\n   \n - \u4f7f\u7528 `\u62bd\u5361\u8bb0\u5f55\u5bfc\u51fa` \u547d\u4ee4\u751f\u6210\u7684\u8868\u683c\u4e0e JSON \u6587\u4ef6\u5747\u7b26\u5408 [\u7edf\u4e00\u53ef\u4ea4\u6362\u7948\u613f\u8bb0\u5f55\u6807\u51c6](https://github.com/DGP-Studio/Snap.Genshin/wiki/StandardFormat)\uff08UIGF\uff09\u683c\u5f0f\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u5728\u5176\u4ed6\u652f\u6301\u6b64\u6807\u51c6\u7684\u5de5\u5177\u4e2d\u5bfc\u5165\u3002\u5bfc\u51fa\u7684\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u3001\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie \u5728\u67d0\u4e9b\u5730\u65b9\u4e5f\u8bb8\u6709\u7528\u3002\n   \n - \u63d2\u4ef6\u8fd0\u884c\u540e\uff0c\u7528\u6237\u7684\u57fa\u672c\u914d\u7f6e\u4fe1\u606f\u4f1a\u5199\u5165 `config.json` \u6587\u4ef6\uff0c\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u6570\u636e\u7f13\u5b58\u4e8e `gachalogs-{uid}.json` \u6587\u4ef6\u3002\n\n\n## \u547d\u4ee4\u8bf4\u660e\n\n\n - `\u62bd\u5361\u8bb0\u5f55` / `ckjl`\n   \n   \u8fd4\u56de\u4e00\u5f20\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7edf\u8ba1\u56fe\uff0c\u6837\u5f0f\u4e0e https://genshin.voderl.cn/ \u4e00\u81f4\u3002\n   \n   | \u53ef\u9009\u9644\u5e26\u53c2\u6570 | \u9ed8\u8ba4 | \u8bf4\u660e |\n   |:-----------|:-----|:----|\n   | `\u5237\u65b0` / `-f` / `--force` | \u7a7a | \u8981\u6c42\u5f3a\u5236\u5237\u65b0\u6700\u65b0\u7948\u613f\u5386\u53f2\u8bb0\u5f55\uff0c\u5373\u4f7f\u672c\u5730\u7f13\u5b58\u672a\u8fc7\u671f\uff08\u7ed3\u679c\u9ed8\u8ba4\u7f13\u5b58 1 \u5c0f\u65f6\uff09 |\n   | \u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5 | \u7a7a | \u6307\u5b9a\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\uff08\u4ec5\u521d\u6b21\u4f7f\u7528\u3001\u65e0\u6cd5\u81ea\u52a8\u66f4\u65b0\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u65f6\u751f\u6548\uff09 |\n   | \u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie | \u7a7a | \u6307\u5b9a\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie\uff08\u4ec5\u521d\u6b21\u4f7f\u7528\u3001\u65e0\u6cd5\u81ea\u52a8\u66f4\u65b0\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u65f6\u751f\u6548\uff09 |\n   \n - `\u62bd\u5361\u6210\u5c31` / `ckcj`\n   \n   \u8fd4\u56de\u4e00\u5f20\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u6210\u5c31\u56fe\uff0c\u6837\u5f0f\u4e0e https://genshin.voderl.cn/ \u4e00\u81f4\u3002\n   \n - \u62bd\u5361\u8bb0\u5f55\u5bfc\u5165\uff08\u5728\u79c1\u804a\u6216\u7fa4\u804a\u4e2d\u4e0a\u4f20\u62bd\u5361\u8bb0\u5f55\u6587\u4ef6\uff09\n   \n   \u8fd4\u56de\u5bfc\u5165\u7ed3\u679c\u53ca\u4e00\u5f20\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7edf\u8ba1\u56fe\u3002\n   \n   \u666e\u901a\u7528\u6237\u53ea\u5141\u8bb8\u5bfc\u5165\u4e0e\u672c\u5730\u8bb0\u5f55\uff08\u5982\u679c\u6709\uff09\u5f52\u5c5e UID \u76f8\u540c\u7684\u62bd\u5361\u8bb0\u5f55\u3002\u8d85\u7ea7\u7528\u6237\u5728\u666e\u901a\u7528\u6237\u89c4\u5219\u57fa\u7840\u4e0a\uff0c\u8fd8\u5141\u8bb8\u4e3a\u62e5\u6709\u672c\u5730\u8bb0\u5f55\u7684\u5176\u4ed6\u7528\u6237\u5bfc\u5165 UID \u76f8\u540c\u7684\u62bd\u5361\u8bb0\u5f55\u3002\n   \n   \u76ee\u524d\u652f\u6301\u5bfc\u5165\u7684\u6587\u4ef6\u683c\u5f0f\u6709\uff1a\n   \n   + \u7a0b\u5e8f\u5185\u90e8\u7f13\u5b58\u683c\u5f0f\u3002\u5bfc\u5165\u540e\u6267\u884c\u6062\u590d\uff0c\u5373\u5c06\u672c\u5730\u8bb0\u5f55\u76f4\u63a5\u66ff\u6362\u4e3a\u8be5\u6587\u4ef6\u7684\u8bb0\u5f55\n   + UIGF v2.2 \u683c\u5f0f\uff0c\u5e76\u4e14\u6bcf\u6761\u8bb0\u5f55\u5fc5\u987b\u62e5\u6709 `time` `rank_type` \u7b49 UIGF v2.2 \u6807\u51c6\u4e2d\u5b9a\u4e49\u4e3a\u975e\u5fc5\u9700\u7684\u5b57\u6bb5\u3002\u5bfc\u5165\u540e\u6267\u884c\u5408\u5e76\uff0c\u5373\u5c1d\u8bd5\u5c06\u672c\u5730\u8bb0\u5f55\u4e0e\u8be5\u6587\u4ef6\u7684\u8bb0\u5f55\u5408\u5e76\n   \n   \u5982\u679c\u5bfc\u5165\u524d *\u88ab\u5bfc\u5165\u8005* \u6709\u672c\u5730\u8bb0\u5f55\uff0c\u63d2\u4ef6\u4f1a\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u8bb0\u5f55\u5907\u4efd\u6587\u4ef6\u7528\u4e8e\u610f\u5916\u6062\u590d\uff0c\u5e76\u5c1d\u8bd5\u901a\u8fc7\u79c1\u804a\u5c06\u6b64\u6587\u4ef6\u53d1\u9001\u7ed9 *\u88ab\u5bfc\u5165\u8005*\uff08\u5982\u679c\u53d1\u9001\u6210\u529f\u5219 Bot \u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u7684\u5907\u4efd\u6587\u4ef6\u4f1a\u88ab\u5220\u9664\uff09\u3002\u4e00\u65e6\u53d1\u73b0\u63d2\u4ef6\u5bfc\u5165\u540e\u8bb0\u5f55\u5f02\u5e38\uff0c*\u88ab\u5bfc\u5165\u8005* \u53ef\u4ee5\u76f4\u63a5\u53d1\u9001\u6b64\u6587\u4ef6\u7ed9 Bot \u6765\u89e6\u53d1\u8bb0\u5f55\u6062\u590d\u3002\n   \n - `\u62bd\u5361\u8bb0\u5f55\u5bfc\u51fa` / `logexp` / `ckjldc`\n   \n   \u5bfc\u51fa\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u8868\u683c\uff0c\u901a\u8fc7\u53ef\u9009\u9644\u5e26\u53c2\u6570\u6307\u5b9a\u5bfc\u51fa\u7948\u613f\u5386\u53f2\u8bb0\u5f55 JSON \u6587\u4ef6\u3001\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5\u6216\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie\u3002\n   \n   | \u53ef\u9009\u9644\u5e26\u53c2\u6570 | \u9ed8\u8ba4 | \u8bf4\u660e |\n   |:-----------|:-----|:----|\n   | @\u67d0\u4eba | **@\u81ea\u5df1** | \u6307\u5b9a\u5bfc\u51fa\u8bb0\u5f55\u7528\u6237\uff0c\u4ec5 **Bot \u7ba1\u7406\u5458** \u53ef\u5bfc\u51fa\u5176\u4ed6\u7528\u6237\u7684\u8bb0\u5f55 |\n   | `\u7edf\u4e00` / `\u6807\u51c6` / `uigf` / `json` | \u7a7a | \u6307\u5b9a\u5bfc\u51fa\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u4e3a JSON \u6587\u4ef6 |\n   | `\u94fe\u63a5` / `\u5730\u5740` / `url` | \u7a7a | \u6307\u5b9a\u5bfc\u51fa\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u94fe\u63a5 |\n   | `\u997c\u5e72` / `ck` / `cookie` | \u7a7a | \u6307\u5b9a\u5bfc\u51fa\u7c73\u54c8\u6e38\u901a\u884c\u8bc1 Cookie |\n   \n   ![\u5bfc\u51fa\u793a\u610f\u56fe](https://user-images.githubusercontent.com/22407052/187933780-64fa0be4-a43f-40f1-9fa9-88e033e9d372.png)\n   \n - `\u62bd\u5361\u8bb0\u5f55\u5220\u9664` / `logdel` / `ckjldc`\n   \n   \u9ed8\u8ba4\u53ea\u5220\u9664\u672c\u5730\u7948\u613f\u5386\u53f2\u8bb0\u5f55\u7f13\u5b58\uff08\u4e0d\u4f1a\u5f71\u54cd Cookie \u7b49\u914d\u7f6e\u6570\u636e\uff09\uff0c\u5373\u53ea\u5220\u9664 `gachalogs-{uid}.json` \u6587\u4ef6\u3002\n   \n   \u5982\u679c\u9700\u8981\u8fde\u540c\u6307\u5b9a\u7528\u6237\u5728 `config.json` \u6587\u4ef6\u4e2d\u7684\u914d\u7f6e\u4e00\u8d77\u5220\u9664\uff0c\u8bf7\u4f7f\u7528\u9644\u5e26\u53c2\u6570 `\u5168\u90e8` \u7b49\u3002\n   \n   \u8bb0\u5f55\u3001\u914d\u7f6e\u4e00\u65e6\u5220\u9664\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u6240\u4ee5\u53ea\u6709\u8f93\u5165\u4e2d\u9644\u5e26\u4e86 `\u786e\u8ba4` \u7b49\u9644\u5e26\u53c2\u6570\u65f6\uff0c\u547d\u4ee4\u624d\u4f1a\u771f\u6b63\u5bf9\u672c\u5730\u6587\u4ef6\u6267\u884c\u5220\u9664\u52a8\u4f5c\u3002\n   \n   | \u53ef\u9009\u9644\u5e26\u53c2\u6570 | \u9ed8\u8ba4 | \u8bf4\u660e |\n   |:-----------|:-----|:----|\n   | @\u67d0\u4eba | **@\u81ea\u5df1** | \u6307\u5b9a\u5220\u9664\u8bb0\u5f55\u6216\u914d\u7f6e\u7684\u7528\u6237\uff0c\u4ec5 **Bot \u7ba1\u7406\u5458** \u53ef\u5220\u9664\u5176\u4ed6\u7528\u6237\u7684\u8bb0\u5f55\u6216\u914d\u7f6e |\n   | `\u5f3a\u5236` / `\u786e\u8ba4` / `force` / `-f` / `-y` | \u7a7a | \u5220\u9664\u64cd\u4f5c\u786e\u8ba4 |\n   | `\u5168\u90e8` / `\u6240\u6709` / `\u914d\u7f6e` / `all` / `-a` / `config` / `-c` | \u7a7a | \u6307\u5b9a\u5220\u9664\u7528\u6237\u7684 **\u914d\u7f6e\u548c\u8bb0\u5f55** \u5168\u90e8\u6570\u636e |\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) | **[@sunfkny/genshin-gacha-export](https://github.com/sunfkny/genshin-gacha-export)** | **[@voderl/genshin-gacha-analyzer](https://github.com/voderl/genshin-gacha-analyzer)** | [@vikiboss/genshin-helper](https://github.com/vikiboss/genshin-helper) | [@DGP-Studio/Snap.Metadata](https://github.com/DGP-Studio/Snap.Metadata)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Genshin gacha history analysis plugin for NoneBot2",
    "version": "0.2.13",
    "project_urls": {
        "Documentation": "https://github.com/monsterxcn/nonebot-plugin-gachalogs#readme",
        "Homepage": "https://github.com/monsterxcn/nonebot-plugin-gachalogs"
    },
    "split_keywords": [
        "nonebot",
        "nonebot2",
        "genshin",
        "gacha"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd98817305b26ed9bfa5732022a67a562dd82924b465e556e2137120a3406d51",
                "md5": "489f8b602e87b1245785131fd97ed176",
                "sha256": "4974a2d11a3a3cef37823b491336369889ea7bbf26b73061ee839d994271bd80"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_gachalogs-0.2.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "489f8b602e87b1245785131fd97ed176",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0",
            "size": 40796,
            "upload_time": "2023-07-10T08:08:27",
            "upload_time_iso_8601": "2023-07-10T08:08:27.393467Z",
            "url": "https://files.pythonhosted.org/packages/fd/98/817305b26ed9bfa5732022a67a562dd82924b465e556e2137120a3406d51/nonebot_plugin_gachalogs-0.2.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "400f442721b8cad6973f5be9448c6d8fe5793efa8fac6079e9fb686c3bd73b1e",
                "md5": "2fd327f64bc70aa5dad0723632f724be",
                "sha256": "4c57b2f67cfd3113f332742ad55eb1d65bcbfde334b0f4a608d8cb1747d83636"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_gachalogs-0.2.13.tar.gz",
            "has_sig": false,
            "md5_digest": "2fd327f64bc70aa5dad0723632f724be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0",
            "size": 40563,
            "upload_time": "2023-07-10T08:08:28",
            "upload_time_iso_8601": "2023-07-10T08:08:28.913139Z",
            "url": "https://files.pythonhosted.org/packages/40/0f/442721b8cad6973f5be9448c6d8fe5793efa8fac6079e9fb686c3bd73b1e/nonebot_plugin_gachalogs-0.2.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 08:08:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "monsterxcn",
    "github_project": "nonebot-plugin-gachalogs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-gachalogs"
}
        
Elapsed time: 0.11953s