nonebot-plugin-bfinfo


Namenonebot-plugin-bfinfo JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/GC-ZF/nonebot_plugin_bfinfo
Summarynonebot plugin bfinfo
upload_time2023-01-05 14:16:27
maintainer
docs_urlNone
authorzhangshier
requires_python>=3.7.3,<4.0
license
keywords pip nonebot2 nonebot battlefield nonebot_plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://v2.nonebot.dev/"><img src="https://v2.nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>
<div align="center">
<h1 align="center">🔥 nonebot_plugin_bfinfo</h1>


✨ 战地1、5战绩查询 ✨

</div>

<p align="center">
  <a href="https://github.com/GC-ZF/nonebot_plugin_bfinfo/blob/main/LICENSE">
    <img src="https://img.shields.io/github/license/GC-ZF/nonebot_plugin_bfinfo" alt="license">
  </a>
  <a href="https://pypi.python.org/pypi/nonebot_plugin_bfinfo">
    <img src="https://img.shields.io/pypi/v/nonebot_plugin_bfinfo" alt="pypi">
  </a>
  <img src="https://img.shields.io/badge/python-3.7.3+-blue" alt="python">
  <img  src="https://visitor-badge.glitch.me/badge?page_id=nonebot_plugin_bfinfo" /><br />
</p></br>

## 插件描述

一款基于[Nonebot2](https://github.com/nonebot/nonebot2)的插件

调用[Stats API for the Battlefield series](https://api.gametools.network/docs),用于QQ私聊或群聊发送战地游戏ID,返回基础信息以及最佳兵种、最佳枪械、最佳载具、最佳模式信息

由于API返回信息不全,获取的json存在一些问题,无法获取正确信息

* 战地一
  * 等级(`rank`)字段为0
  * 总治疗量(`heals`)字段为None
* 战地五
  * 总治疗量(`heals`)字段为None
  * 最佳兵种(`classes`)字段中所有数据为0
  * 最佳游戏模式(`gamemodes`)字段不存在

因为期末考试,中间隔了好久才完成,文件夹**本地测试源码**中存放了未加入nonebot框架以前的源码,可以在编译器中直接调试

* BF1_record:初步完成基本功能,输入游戏ID,绘制基础信息
* Battlefield_Test:`03数据分析.py`中实现输入游戏ID,绘制基础信息以及最佳兵种、最佳枪械、最佳载具、最佳模式信息

提供以上源码是为了方便测试,如果你有更好的解决办法,欢迎留言

API如下,将`{player_name}`替换为游戏ID即可在浏览器中查看信息

```python
https://api.gametools.network/bf1/all/?name={player_name}&lang=en-us
https://api.gametools.network/bfv/all/?name={player_name}&lang=en-us    
```

本人未系统学习过py,靠仅有的cpp和py的一点点理解制作的,如果有任何问题、建议,欢迎[issues](https://github.com/GC-ZF/nonebot_plugin_bfinfo/issues)

## 安装
```python
pip install nonebot_plugin_bfinfo
```
## 配置项
在`bot.py`中添加
```python
nonebot.load_plugin("nonebot_plugin_bfinfo")
```
## 命令

在群聊或私聊中发送`BFI+ID`,`BFV+ID`

## 示例

<div align="center">
  <img height="300px" src="https://test1.jsdelivr.net/gh/GC-ZF/nonebot_plugin_bfinfo/BFI示例图片.png">
</div>

<div align="center">
  <img height="300px" src="https://test1.jsdelivr.net/gh/GC-ZF/nonebot_plugin_bfinfo/BFV示例图片.png">
</div>

## 历史

2022.07.05 成功提交给nonebot2,第一次贡献代码,激动!

2022.07.08 修复win环境下,字体缺失,主要原因是配置了Linux的绝对路径,获取文字材质。改为直接在插件中存放**华文行楷.TTF**



欢迎小🍟入群927254485


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GC-ZF/nonebot_plugin_bfinfo",
    "name": "nonebot-plugin-bfinfo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.3,<4.0",
    "maintainer_email": "",
    "keywords": "pip,nonebot2,nonebot,battlefield,nonebot_plugin",
    "author": "zhangshier",
    "author_email": "1310446718@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/06/9f3dedbae50ef469eada9ffd3aa8bfc0f5250a8e597984fca0ebb6b7c1e1/nonebot_plugin_bfinfo-0.0.5.tar.gz",
    "platform": "any",
    "description": "<p align=\"center\">\n  <a href=\"https://v2.nonebot.dev/\"><img src=\"https://v2.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"></a>\n</p>\n<div align=\"center\">\n<h1 align=\"center\">\ud83d\udd25 nonebot_plugin_bfinfo</h1>\n\n\n\u2728 \u6218\u57301\u30015\u6218\u7ee9\u67e5\u8be2 \u2728\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://github.com/GC-ZF/nonebot_plugin_bfinfo/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/GC-ZF/nonebot_plugin_bfinfo\" alt=\"license\">\n  </a>\n  <a href=\"https://pypi.python.org/pypi/nonebot_plugin_bfinfo\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot_plugin_bfinfo\" alt=\"pypi\">\n  </a>\n  <img src=\"https://img.shields.io/badge/python-3.7.3+-blue\" alt=\"python\">\n  <img  src=\"https://visitor-badge.glitch.me/badge?page_id=nonebot_plugin_bfinfo\" /><br />\n</p></br>\n\n## \u63d2\u4ef6\u63cf\u8ff0\n\n\u4e00\u6b3e\u57fa\u4e8e[Nonebot2](https://github.com/nonebot/nonebot2)\u7684\u63d2\u4ef6\n\n\u8c03\u7528[Stats API for the Battlefield series](https://api.gametools.network/docs)\uff0c\u7528\u4e8eQQ\u79c1\u804a\u6216\u7fa4\u804a\u53d1\u9001\u6218\u5730\u6e38\u620fID\uff0c\u8fd4\u56de\u57fa\u7840\u4fe1\u606f\u4ee5\u53ca\u6700\u4f73\u5175\u79cd\u3001\u6700\u4f73\u67aa\u68b0\u3001\u6700\u4f73\u8f7d\u5177\u3001\u6700\u4f73\u6a21\u5f0f\u4fe1\u606f\n\n\u7531\u4e8eAPI\u8fd4\u56de\u4fe1\u606f\u4e0d\u5168\uff0c\u83b7\u53d6\u7684json\u5b58\u5728\u4e00\u4e9b\u95ee\u9898\uff0c\u65e0\u6cd5\u83b7\u53d6\u6b63\u786e\u4fe1\u606f\n\n* \u6218\u5730\u4e00\n  * \u7b49\u7ea7(`rank`)\u5b57\u6bb5\u4e3a0\n  * \u603b\u6cbb\u7597\u91cf(`heals`)\u5b57\u6bb5\u4e3aNone\n* \u6218\u5730\u4e94\n  * \u603b\u6cbb\u7597\u91cf(`heals`)\u5b57\u6bb5\u4e3aNone\n  * \u6700\u4f73\u5175\u79cd(`classes`)\u5b57\u6bb5\u4e2d\u6240\u6709\u6570\u636e\u4e3a0\n  * \u6700\u4f73\u6e38\u620f\u6a21\u5f0f(`gamemodes`)\u5b57\u6bb5\u4e0d\u5b58\u5728\n\n\u56e0\u4e3a\u671f\u672b\u8003\u8bd5\uff0c\u4e2d\u95f4\u9694\u4e86\u597d\u4e45\u624d\u5b8c\u6210\uff0c\u6587\u4ef6\u5939**\u672c\u5730\u6d4b\u8bd5\u6e90\u7801**\u4e2d\u5b58\u653e\u4e86\u672a\u52a0\u5165nonebot\u6846\u67b6\u4ee5\u524d\u7684\u6e90\u7801\uff0c\u53ef\u4ee5\u5728\u7f16\u8bd1\u5668\u4e2d\u76f4\u63a5\u8c03\u8bd5\n\n* BF1_record\uff1a\u521d\u6b65\u5b8c\u6210\u57fa\u672c\u529f\u80fd\uff0c\u8f93\u5165\u6e38\u620fID\uff0c\u7ed8\u5236\u57fa\u7840\u4fe1\u606f\n* Battlefield_Test\uff1a`03\u6570\u636e\u5206\u6790.py`\u4e2d\u5b9e\u73b0\u8f93\u5165\u6e38\u620fID\uff0c\u7ed8\u5236\u57fa\u7840\u4fe1\u606f\u4ee5\u53ca\u6700\u4f73\u5175\u79cd\u3001\u6700\u4f73\u67aa\u68b0\u3001\u6700\u4f73\u8f7d\u5177\u3001\u6700\u4f73\u6a21\u5f0f\u4fe1\u606f\n\n\u63d0\u4f9b\u4ee5\u4e0a\u6e90\u7801\u662f\u4e3a\u4e86\u65b9\u4fbf\u6d4b\u8bd5\uff0c\u5982\u679c\u4f60\u6709\u66f4\u597d\u7684\u89e3\u51b3\u529e\u6cd5\uff0c\u6b22\u8fce\u7559\u8a00\n\nAPI\u5982\u4e0b\uff0c\u5c06`{player_name}`\u66ff\u6362\u4e3a\u6e38\u620fID\u5373\u53ef\u5728\u6d4f\u89c8\u5668\u4e2d\u67e5\u770b\u4fe1\u606f\n\n```python\nhttps://api.gametools.network/bf1/all/?name={player_name}&lang=en-us\nhttps://api.gametools.network/bfv/all/?name={player_name}&lang=en-us    \n```\n\n\u672c\u4eba\u672a\u7cfb\u7edf\u5b66\u4e60\u8fc7py,\u9760\u4ec5\u6709\u7684cpp\u548cpy\u7684\u4e00\u70b9\u70b9\u7406\u89e3\u5236\u4f5c\u7684,\u5982\u679c\u6709\u4efb\u4f55\u95ee\u9898\u3001\u5efa\u8bae,\u6b22\u8fce[issues](https://github.com/GC-ZF/nonebot_plugin_bfinfo/issues)\n\n## \u5b89\u88c5\n```python\npip install nonebot_plugin_bfinfo\n```\n## \u914d\u7f6e\u9879\n\u5728`bot.py`\u4e2d\u6dfb\u52a0\n```python\nnonebot.load_plugin(\"nonebot_plugin_bfinfo\")\n```\n## \u547d\u4ee4\n\n\u5728\u7fa4\u804a\u6216\u79c1\u804a\u4e2d\u53d1\u9001`BFI+ID`\uff0c`BFV+ID`\n\n## \u793a\u4f8b\n\n<div align=\"center\">\n  <img height=\"300px\" src=\"https://test1.jsdelivr.net/gh/GC-ZF/nonebot_plugin_bfinfo/BFI\u793a\u4f8b\u56fe\u7247.png\">\n</div>\n\n<div align=\"center\">\n  <img height=\"300px\" src=\"https://test1.jsdelivr.net/gh/GC-ZF/nonebot_plugin_bfinfo/BFV\u793a\u4f8b\u56fe\u7247.png\">\n</div>\n\n## \u5386\u53f2\n\n2022.07.05 \u6210\u529f\u63d0\u4ea4\u7ed9nonebot2\uff0c\u7b2c\u4e00\u6b21\u8d21\u732e\u4ee3\u7801\uff0c\u6fc0\u52a8\uff01\n\n2022.07.08 \u4fee\u590dwin\u73af\u5883\u4e0b\uff0c\u5b57\u4f53\u7f3a\u5931\uff0c\u4e3b\u8981\u539f\u56e0\u662f\u914d\u7f6e\u4e86Linux\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u83b7\u53d6\u6587\u5b57\u6750\u8d28\u3002\u6539\u4e3a\u76f4\u63a5\u5728\u63d2\u4ef6\u4e2d\u5b58\u653e**\u534e\u6587\u884c\u6977.TTF**\n\n\n\n\u6b22\u8fce\u5c0f\ud83c\udf5f\u5165\u7fa4927254485\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "nonebot plugin bfinfo",
    "version": "0.0.5",
    "split_keywords": [
        "pip",
        "nonebot2",
        "nonebot",
        "battlefield",
        "nonebot_plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86d01841785fcf97313ae4e8116bbf6718c6cbeefceadc9bd27b1c79dc443cbe",
                "md5": "d40e08d99707e7a1ad898d5038fd2aa5",
                "sha256": "b5196401171239e7d989f90d0a857b6bbb86cf30e9d8ec9ec9b79fa4ec52251e"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d40e08d99707e7a1ad898d5038fd2aa5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.3,<4.0",
            "size": 5751073,
            "upload_time": "2023-01-05T14:10:41",
            "upload_time_iso_8601": "2023-01-05T14:10:41.291955Z",
            "url": "https://files.pythonhosted.org/packages/86/d0/1841785fcf97313ae4e8116bbf6718c6cbeefceadc9bd27b1c79dc443cbe/nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a069f3dedbae50ef469eada9ffd3aa8bfc0f5250a8e597984fca0ebb6b7c1e1",
                "md5": "62390ee5921fef9127f8d9e8646bd7fa",
                "sha256": "9bf8be4b5ecd914a1bd382991a92c97addac29dda731588f5ddbd2e8d9bfbaa3"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_bfinfo-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "62390ee5921fef9127f8d9e8646bd7fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.3,<4.0",
            "size": 5408385,
            "upload_time": "2023-01-05T14:16:27",
            "upload_time_iso_8601": "2023-01-05T14:16:27.596987Z",
            "url": "https://files.pythonhosted.org/packages/7a/06/9f3dedbae50ef469eada9ffd3aa8bfc0f5250a8e597984fca0ebb6b7c1e1/nonebot_plugin_bfinfo-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-05 14:16:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "GC-ZF",
    "github_project": "nonebot_plugin_bfinfo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nonebot-plugin-bfinfo"
}
        
Elapsed time: 0.24395s