Name | PaifuLogger JSON |
Version |
0.4.2
JSON |
| download |
home_page | None |
Summary | Logging tenhou paifu into excel or html file with some key information. |
upload_time | 2024-09-28 09:35:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2023-2024 Jim137 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
mahjong
review
logger
paifu
tenhou
haifu
paipu
riichi-mahjong
|
VCS |
|
bugtrack_url |
|
requirements |
openpyxl
lxml
tables
pandas
platformdirs
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tenhou Paifu Logger
[![build](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/publish-to-test-pypi.yml/badge.svg)](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/publish-to-test-pypi.yml)
[![lint](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/test.yml/badge.svg)](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/test.yml)
[<img src="https://img.shields.io/pypi/v/PaifuLogger?style=plastic"> <img src="https://img.shields.io/pypi/wheel/PaifuLogger?style=plastic">](https://pypi.org/project/PaifuLogger/)
[![Downloads](https://static.pepy.tech/badge/Paifulogger)](https://pepy.tech/project/Paifulogger)
[<img src="https://img.shields.io/github/stars/Jim137/Tenhou-Paifu-Logger?style=plastic">](https://github.com/Jim137/Tenhou-Paifu-Logger/)
[<img src="https://img.shields.io/github/downloads/Jim137/Tenhou-Paifu-Logger/total?style=plastic">](https://github.com/Jim137/Tenhou-Paifu-Logger/releases)
![support-version](https://img.shields.io/pypi/pyversions/PaifuLogger?style=plastic)
![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgray?style=plastic)
![License](https://img.shields.io/github/license/Jim137/Tenhou-Paifu-Logger?style=plastic)
Logging tenhou paifu into excel, csv or html file with some key information.
![Generated by DALL·E](https://github.com/Jim137/Tenhou-Paifu-Logger/raw/master/READMEs/image/paifulogger.png)
If you like this project, please leave a star. It will be a great encouragement for me. And if you have any suggestions, please feel free to create an issue.
[Downloads](https://github.com/Jim137/Tenhou-Paifu-Logger/releases/latest) | [繁體中文](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_zh_TW.md) | [简体中文](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_zh.md) | [日本語](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_ja.md)
## Requirements
* Python 3.10 or later
Since CLI-0.3.8, the project is only compatible with Python 3.10 or later.
For Python 3.9 or earlier users, please use [CLI-0.3.7.1](https://github.com/Jim137/Tenhou-Paifu-Logger/tree/CLI-0.3.7.1) which is the last version that supports Python 3.9 or earlier.
Or download from pypi with the following command.
```shell
pip install PaifuLogger==0.3.7.1
```
## Usage
### Command Line / Script
1. Download the project.
> a. Via GitHub.
>
>> i. Clone the repository or download the [latest release](https://github.com/Jim137/Tenhou-Paifu-Logger/releases/latest).
>>
>> ```shell
>> git clone https://github.com/Jim137/Tenhou-Paifu-Logger.git
>> ```
>>
>> ii. Copy the paifu URL from tenhou.net to clipboard.
>>
>> iii. Run `runlog-user.bat` or `runlog-user.sh`.
>
> b. Via pypi.
>
>> i. Open terminal and install with pip command.
>>
>> ```shell
>> pip install PaifuLogger
>> ```
>>
>> ii. Copy the paifu URL from tenhou.net to clipboard. And run by
>>
>> ```shell
>> plog -l [language] -o [output directory] [paifu URLs]
>> ```
>>
>> ```shell
>> paifu plog -l [language] -o [output directory] [paifu URLs]
>> ```
2. Once `Please enter the URL of match:` appears, paste the URL and press Enter.\
Note: In the latest version, you can input multiple URLs at once, separated by whatever you like. If you are lazy, you can just paste w/o anything.
3. After `Match of {paifu name} has been recorded` appears, the paifu has been successfully logged.
### Inline
You can manually log the paifu by the following code.
```python
from paifulogger import get_log_func, get_paifu, localized_str, log_paifu
url = "Your paifu URL"
local_lang = localized_str("en") # Localization
log_formats = get_log_func(["csv", "html"]) # Log into csv and html file.
output = "./" # Output directory
mjai = False # Whether have output in mjai format
# Log the paifu into the file.
log_paifu(
url,
log_formats = log_formats,
local_lang = local_lang,
output = output,
mjai = mjai
)
# Get Paifu object, which contains all the information of the paifu.
paifu = get_paifu(url, local_lang)
```
## Features
* [x] Support multiple URLs at once.
* [x] Log paifu into excel, csv or html file with some key information. (-f, --format)
* [x] Support logging to multiple formats at once. (e.g.: -f csv -f html; -a, --all-formats)
* [x] Distinguish Sanma(3p) and Yonma(4p) and log into separate sheets.
* [x] Skip duplicated paifu
* [x] Remake the paifu with URL already logged (-r, --remake). It will be useful when we updated the logging information in future.
* [x] Customized output directory (-o, --output)
* [x] Support mjai format paifu output (--mjai). *You have to run `git pull --recurse-submodules` first*.
* [x] Localization support (-l, --language)
* [x] English: en
* [x] Traditional Chinese: zh_tw
* [x] Simplified Chinese: zh
* [x] Japanese (ChatGPT): ja
* [x] Support config file. Placing `config.json` in the same directory as the execution enables local configuration. For global configuration, place it in the following directories:
* Windows: `%localappdata%\Jim137\paifulogger\config.json`
* macOS: `/Users/{UserName}/Library/Application Support/paifulogger/config.json`
* Linux: `~/.local/share/paifulogger/config.json`
* [x] Support logging from Tenhou client(*.mjlog). (-c, --from-client DIR_TO_MJLOG)\
Note: Typically, the saved directory is `{Documents}/My Tenhou/log/` on Windows.
* [x] Match replay for html format. By clicking the match you want to review, the match replay will pop up accordingly.
## Information logged
* Game time
* Placing
* URL (for future use)
* Rate before the game
* The change of Rate: Note it assumes that the player has played more than 400 games.
* Number of wins
* Number of deal-ins
## Future features
* [ ] Agari analysis
* [ ] Support Majsoul paifu
* [ ] GUI
## Contribute
We welcome all kinds of contributions, including but not limited to bug reports, pull requests, feature requests, documentation improvements, localizations...etc.
See [CONTRIBUTING.md](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/CONTRIBUTING.md) for more details.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "PaifuLogger",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "mahjong, review, logger, paifu, tenhou, haifu, paipu, riichi-mahjong",
"author": null,
"author_email": "Jim137 <jim@mail.jim137.eu.org>",
"download_url": "https://files.pythonhosted.org/packages/06/44/bc4bd2fad1aadb9ecd2cd62c2ae3a17eafb538c91e4ccd2cd88df14f1115/paifulogger-0.4.2.tar.gz",
"platform": null,
"description": "# Tenhou Paifu Logger\n\n[![build](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/publish-to-test-pypi.yml/badge.svg)](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/publish-to-test-pypi.yml)\n[![lint](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/test.yml/badge.svg)](https://github.com/Jim137/Tenhou-Paifu-Logger/actions/workflows/test.yml)\n[<img src=\"https://img.shields.io/pypi/v/PaifuLogger?style=plastic\"> <img src=\"https://img.shields.io/pypi/wheel/PaifuLogger?style=plastic\">](https://pypi.org/project/PaifuLogger/)\n[![Downloads](https://static.pepy.tech/badge/Paifulogger)](https://pepy.tech/project/Paifulogger)\n[<img src=\"https://img.shields.io/github/stars/Jim137/Tenhou-Paifu-Logger?style=plastic\">](https://github.com/Jim137/Tenhou-Paifu-Logger/)\n[<img src=\"https://img.shields.io/github/downloads/Jim137/Tenhou-Paifu-Logger/total?style=plastic\">](https://github.com/Jim137/Tenhou-Paifu-Logger/releases)\n![support-version](https://img.shields.io/pypi/pyversions/PaifuLogger?style=plastic)\n![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgray?style=plastic)\n![License](https://img.shields.io/github/license/Jim137/Tenhou-Paifu-Logger?style=plastic)\n\nLogging tenhou paifu into excel, csv or html file with some key information.\n\n![Generated by DALL\u00b7E](https://github.com/Jim137/Tenhou-Paifu-Logger/raw/master/READMEs/image/paifulogger.png)\n\nIf you like this project, please leave a star. It will be a great encouragement for me. And if you have any suggestions, please feel free to create an issue.\n\n[Downloads](https://github.com/Jim137/Tenhou-Paifu-Logger/releases/latest) | [\u7e41\u9ad4\u4e2d\u6587](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_zh_TW.md) | [\u7b80\u4f53\u4e2d\u6587](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_zh.md) | [\u65e5\u672c\u8a9e](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/READMEs/README_ja.md)\n\n## Requirements\n\n* Python 3.10 or later\n\nSince CLI-0.3.8, the project is only compatible with Python 3.10 or later.\nFor Python 3.9 or earlier users, please use [CLI-0.3.7.1](https://github.com/Jim137/Tenhou-Paifu-Logger/tree/CLI-0.3.7.1) which is the last version that supports Python 3.9 or earlier.\nOr download from pypi with the following command.\n\n```shell\npip install PaifuLogger==0.3.7.1\n```\n\n## Usage\n\n### Command Line / Script\n\n1. Download the project.\n\n> a. Via GitHub.\n>\n>> i. Clone the repository or download the [latest release](https://github.com/Jim137/Tenhou-Paifu-Logger/releases/latest).\n>>\n>> ```shell\n>> git clone https://github.com/Jim137/Tenhou-Paifu-Logger.git\n>> ```\n>>\n>> ii. Copy the paifu URL from tenhou.net to clipboard.\n>>\n>> iii. Run `runlog-user.bat` or `runlog-user.sh`.\n>\n> b. Via pypi.\n>\n>> i. Open terminal and install with pip command.\n>>\n>> ```shell\n>> pip install PaifuLogger\n>> ```\n>>\n>> ii. Copy the paifu URL from tenhou.net to clipboard. And run by\n>>\n>> ```shell\n>> plog -l [language] -o [output directory] [paifu URLs]\n>> ```\n>>\n>> ```shell\n>> paifu plog -l [language] -o [output directory] [paifu URLs]\n>> ```\n\n2. Once `Please enter the URL of match:` appears, paste the URL and press Enter.\\\nNote: In the latest version, you can input multiple URLs at once, separated by whatever you like. If you are lazy, you can just paste w/o anything.\n3. After `Match of {paifu name} has been recorded` appears, the paifu has been successfully logged.\n\n### Inline\n\nYou can manually log the paifu by the following code.\n\n```python\nfrom paifulogger import get_log_func, get_paifu, localized_str, log_paifu\n\nurl = \"Your paifu URL\"\nlocal_lang = localized_str(\"en\") # Localization\nlog_formats = get_log_func([\"csv\", \"html\"]) # Log into csv and html file.\noutput = \"./\" # Output directory\nmjai = False # Whether have output in mjai format\n\n# Log the paifu into the file.\nlog_paifu(\n url,\n log_formats = log_formats,\n local_lang = local_lang,\n output = output,\n mjai = mjai\n)\n# Get Paifu object, which contains all the information of the paifu.\npaifu = get_paifu(url, local_lang)\n```\n\n## Features\n\n* [x] Support multiple URLs at once.\n* [x] Log paifu into excel, csv or html file with some key information. (-f, --format)\n* [x] Support logging to multiple formats at once. (e.g.: -f csv -f html; -a, --all-formats)\n* [x] Distinguish Sanma(3p) and Yonma(4p) and log into separate sheets.\n* [x] Skip duplicated paifu\n* [x] Remake the paifu with URL already logged (-r, --remake). It will be useful when we updated the logging information in future.\n* [x] Customized output directory (-o, --output)\n* [x] Support mjai format paifu output (--mjai). *You have to run `git pull --recurse-submodules` first*.\n* [x] Localization support (-l, --language)\n * [x] English: en\n * [x] Traditional Chinese: zh_tw\n * [x] Simplified Chinese: zh\n * [x] Japanese (ChatGPT): ja\n* [x] Support config file. Placing `config.json` in the same directory as the execution enables local configuration. For global configuration, place it in the following directories:\n * Windows: `%localappdata%\\Jim137\\paifulogger\\config.json`\n * macOS: `/Users/{UserName}/Library/Application Support/paifulogger/config.json`\n * Linux: `~/.local/share/paifulogger/config.json`\n* [x] Support logging from Tenhou client(*.mjlog). (-c, --from-client DIR_TO_MJLOG)\\\nNote: Typically, the saved directory is `{Documents}/My Tenhou/log/` on Windows.\n* [x] Match replay for html format. By clicking the match you want to review, the match replay will pop up accordingly.\n\n## Information logged\n\n* Game time\n* Placing\n* URL (for future use)\n* Rate before the game\n* The change of Rate: Note it assumes that the player has played more than 400 games.\n* Number of wins\n* Number of deal-ins\n\n## Future features\n\n* [ ] Agari analysis\n* [ ] Support Majsoul paifu\n* [ ] GUI\n\n## Contribute\n\nWe welcome all kinds of contributions, including but not limited to bug reports, pull requests, feature requests, documentation improvements, localizations...etc.\n\nSee [CONTRIBUTING.md](https://github.com/Jim137/Tenhou-Paifu-Logger/blob/master/CONTRIBUTING.md) for more details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023-2024 Jim137 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Logging tenhou paifu into excel or html file with some key information.",
"version": "0.4.2",
"project_urls": {
"Homepage": "https://github.com/Jim137/Tenhou-Paifu-Logger"
},
"split_keywords": [
"mahjong",
" review",
" logger",
" paifu",
" tenhou",
" haifu",
" paipu",
" riichi-mahjong"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "73dea7521ef15f76284796d20570d7d632a81c515397f0959eb5ebbee698c2b2",
"md5": "17724f946c4120d2293c02600f6cb426",
"sha256": "963810845edd980c0b490cc890148b25737f37dc7b8a63b92b5833a4e82789ed"
},
"downloads": -1,
"filename": "PaifuLogger-0.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "17724f946c4120d2293c02600f6cb426",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 35273,
"upload_time": "2024-09-28T09:35:16",
"upload_time_iso_8601": "2024-09-28T09:35:16.795151Z",
"url": "https://files.pythonhosted.org/packages/73/de/a7521ef15f76284796d20570d7d632a81c515397f0959eb5ebbee698c2b2/PaifuLogger-0.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0644bc4bd2fad1aadb9ecd2cd62c2ae3a17eafb538c91e4ccd2cd88df14f1115",
"md5": "dceb6e4e25ad581e5b89f22a3b1eeacf",
"sha256": "a627551cab12ac49b8b02d090448ab53be90641665698867992635d194bc7d36"
},
"downloads": -1,
"filename": "paifulogger-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "dceb6e4e25ad581e5b89f22a3b1eeacf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 26758,
"upload_time": "2024-09-28T09:35:18",
"upload_time_iso_8601": "2024-09-28T09:35:18.238745Z",
"url": "https://files.pythonhosted.org/packages/06/44/bc4bd2fad1aadb9ecd2cd62c2ae3a17eafb538c91e4ccd2cd88df14f1115/paifulogger-0.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-28 09:35:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jim137",
"github_project": "Tenhou-Paifu-Logger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "openpyxl",
"specs": []
},
{
"name": "lxml",
"specs": []
},
{
"name": "tables",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "platformdirs",
"specs": []
}
],
"lcname": "paifulogger"
}