naga-helper


Namenaga-helper JSON
Version 0.2.17 PyPI version JSON
download
home_pageNone
SummaryAnalyze reports of riichi mahjong AI NAGA and Mortal.
upload_time2025-07-28 12:45:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseGNU Affero General Public License v3
keywords mahjong riichi naga mortal majsoul tenhou ai
VCS
bugtrack_url
requirements demjson3 numpy requests bs4 beautifulsoup4 mahjong setuptools tqdm
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NAGA/Mortal牌谱解析

这是 [NAGA助手](https://ricochet.cn/riichi/naga) 网站NAGA/Mortal牌谱解析的代码。

之所以开源这部分代码,是因为其技术含金量最高(有实际价值)、计算量较重(缓解网站负载)、且欢迎各位贡献。网站其余部分主要是重CRUD逻辑,参考价值不大,因此不做开源。

## Install
```shell
pip install naga_helper
```

## 模块
### analyzer
分析现有NAGA牌谱报告,使用方式如下:

导入pip包:
```python
from naga_helper.analyzer import parse_report
parse_report('NAGA html content')
```

命令行:
```shell
python naga_helper/analyzer.py <naga牌谱网址> <Mortal牌谱id>
```
其中Mortal牌谱id为选填,如果填写,则会把Mortal的切牌选择合并入NAGA牌谱报告。恶手率/一致率/Rating的计算方式与NAGA一致。

naga牌谱地址可以同时省略前缀与后缀,只保留html key。

格式参考:
```shell
python naga_helper/analyzer.py https://naga.dmv.nico/htmls/9a852e2e3a273e1d5a362d69618000684340d3e0e96024e6fa07858afa1afa00v2_2.html 01f7faef6dc7fe5e

```

### plugins
各类插件,包括NAGA网页模块等

## 功能
1. NAGA牌谱报告分析
2. Mortal牌谱报告分析 & 把Mortal报告融合入NAGA界面
3. NAGA网页端快捷键注入脚本


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "naga-helper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "mahjong, riichi, naga, mortal, majsoul, tenhou, ai",
    "author": null,
    "author_email": "Jianing Shi <1176827825@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/71/26/8603c74b98abd11fc75f629016acdf8e5123139beba84898f137165f3516/naga_helper-0.2.17.tar.gz",
    "platform": null,
    "description": "# NAGA/Mortal\u724c\u8c31\u89e3\u6790\n\n\u8fd9\u662f [NAGA\u52a9\u624b](https://ricochet.cn/riichi/naga) \u7f51\u7ad9NAGA/Mortal\u724c\u8c31\u89e3\u6790\u7684\u4ee3\u7801\u3002\n\n\u4e4b\u6240\u4ee5\u5f00\u6e90\u8fd9\u90e8\u5206\u4ee3\u7801\uff0c\u662f\u56e0\u4e3a\u5176\u6280\u672f\u542b\u91d1\u91cf\u6700\u9ad8\uff08\u6709\u5b9e\u9645\u4ef7\u503c\uff09\u3001\u8ba1\u7b97\u91cf\u8f83\u91cd\uff08\u7f13\u89e3\u7f51\u7ad9\u8d1f\u8f7d\uff09\u3001\u4e14\u6b22\u8fce\u5404\u4f4d\u8d21\u732e\u3002\u7f51\u7ad9\u5176\u4f59\u90e8\u5206\u4e3b\u8981\u662f\u91cdCRUD\u903b\u8f91\uff0c\u53c2\u8003\u4ef7\u503c\u4e0d\u5927\uff0c\u56e0\u6b64\u4e0d\u505a\u5f00\u6e90\u3002\n\n## Install\n```shell\npip install naga_helper\n```\n\n## \u6a21\u5757\n### analyzer\n\u5206\u6790\u73b0\u6709NAGA\u724c\u8c31\u62a5\u544a\uff0c\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff1a\n\n\u5bfc\u5165pip\u5305\uff1a\n```python\nfrom naga_helper.analyzer import parse_report\nparse_report('NAGA html content')\n```\n\n\u547d\u4ee4\u884c\uff1a\n```shell\npython naga_helper/analyzer.py <naga\u724c\u8c31\u7f51\u5740> <Mortal\u724c\u8c31id>\n```\n\u5176\u4e2dMortal\u724c\u8c31id\u4e3a\u9009\u586b\uff0c\u5982\u679c\u586b\u5199\uff0c\u5219\u4f1a\u628aMortal\u7684\u5207\u724c\u9009\u62e9\u5408\u5e76\u5165NAGA\u724c\u8c31\u62a5\u544a\u3002\u6076\u624b\u7387/\u4e00\u81f4\u7387/Rating\u7684\u8ba1\u7b97\u65b9\u5f0f\u4e0eNAGA\u4e00\u81f4\u3002\n\nnaga\u724c\u8c31\u5730\u5740\u53ef\u4ee5\u540c\u65f6\u7701\u7565\u524d\u7f00\u4e0e\u540e\u7f00\uff0c\u53ea\u4fdd\u7559html key\u3002\n\n\u683c\u5f0f\u53c2\u8003\uff1a\n```shell\npython naga_helper/analyzer.py https://naga.dmv.nico/htmls/9a852e2e3a273e1d5a362d69618000684340d3e0e96024e6fa07858afa1afa00v2_2.html 01f7faef6dc7fe5e\n\n```\n\n### plugins\n\u5404\u7c7b\u63d2\u4ef6\uff0c\u5305\u62ecNAGA\u7f51\u9875\u6a21\u5757\u7b49\n\n## \u529f\u80fd\n1. NAGA\u724c\u8c31\u62a5\u544a\u5206\u6790\n2. Mortal\u724c\u8c31\u62a5\u544a\u5206\u6790 & \u628aMortal\u62a5\u544a\u878d\u5408\u5165NAGA\u754c\u9762\n3. NAGA\u7f51\u9875\u7aef\u5feb\u6377\u952e\u6ce8\u5165\u811a\u672c\n\n",
    "bugtrack_url": null,
    "license": "GNU Affero General Public License v3",
    "summary": "Analyze reports of riichi mahjong AI NAGA and Mortal.",
    "version": "0.2.17",
    "project_urls": {
        "Homepage": "https://github.com/sjn4048/naga_helper",
        "Source": "https://github.com/sjn4048/naga_helper"
    },
    "split_keywords": [
        "mahjong",
        " riichi",
        " naga",
        " mortal",
        " majsoul",
        " tenhou",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "85b2bb5a7b72c1be688c9cd55c1249f699a684b43211345ea3fd34aab0c787f5",
                "md5": "eadf5987d47f31793587fe13801644b7",
                "sha256": "76a702238a7ecb8e845144b4696df8732a3c058e325b9cb1977956e662992f61"
            },
            "downloads": -1,
            "filename": "naga_helper-0.2.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eadf5987d47f31793587fe13801644b7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 32385,
            "upload_time": "2025-07-28T12:45:54",
            "upload_time_iso_8601": "2025-07-28T12:45:54.488065Z",
            "url": "https://files.pythonhosted.org/packages/85/b2/bb5a7b72c1be688c9cd55c1249f699a684b43211345ea3fd34aab0c787f5/naga_helper-0.2.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "71268603c74b98abd11fc75f629016acdf8e5123139beba84898f137165f3516",
                "md5": "6df95e320d623b6a5f0eb0671859cc80",
                "sha256": "7357b4c76e8fa754b6350c2a6ddc187aa8e1f3d87cdcbfa2c76cf606ed84bac7"
            },
            "downloads": -1,
            "filename": "naga_helper-0.2.17.tar.gz",
            "has_sig": false,
            "md5_digest": "6df95e320d623b6a5f0eb0671859cc80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 33142,
            "upload_time": "2025-07-28T12:45:56",
            "upload_time_iso_8601": "2025-07-28T12:45:56.952918Z",
            "url": "https://files.pythonhosted.org/packages/71/26/8603c74b98abd11fc75f629016acdf8e5123139beba84898f137165f3516/naga_helper-0.2.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 12:45:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sjn4048",
    "github_project": "naga_helper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "demjson3",
            "specs": [
                [
                    "~=",
                    "3.0.5"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "~=",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.32.0"
                ]
            ]
        },
        {
            "name": "bs4",
            "specs": [
                [
                    "~=",
                    "0.0.1"
                ]
            ]
        },
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    "~=",
                    "4.11.1"
                ]
            ]
        },
        {
            "name": "mahjong",
            "specs": [
                [
                    "~=",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "~=",
                    "70.0.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": []
        }
    ],
    "lcname": "naga-helper"
}
        
Elapsed time: 1.44012s