Skip to main content

No project description provided

Project description

tensoul-py

Convert MahjongSoul log into tenhou.net/6 format. (Inspired by https://github.com/Equim-chan/tensoul)

Usage

You need to have an account from CN server, because only accounts from CN server have the ability to login with username and password.

import json
import sys

from tensoul import MajsoulPaipuDownloader


username = "foo@bar.com"
password = "foobar"
record_uuid = "123456-abcdefgh-1234-abcd-1234-12345678abcd"  # taken from majsoul log link: https://game.maj-soul.com/1/?paipu=<this_part>_a12345678

downloader = MajsoulPaipuDownloader()
await downloader.start(username, password)
try:
    logs = await downloader.download(record_uuid)
    json.dump(logs, sys.stdout, ensure_ascii=False)
finally:
    await downloader.close()

See example.py also

Thanks

https://github.com/MahjongRepository/mahjong_soul_api

https://repo.riichi.moe/library.html#resources-majplus

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tensoul-0.1.8.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tensoul-0.1.8-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file tensoul-0.1.8.tar.gz.

File metadata

  • Download URL: tensoul-0.1.8.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tensoul-0.1.8.tar.gz
Algorithm Hash digest
SHA256 23c17199dbf02df24d4b2c70febea549d854e03eef68ba3c4798713bc245b75f
MD5 f2ce14677b3f478d57de735d904f8102
BLAKE2b-256 047aa780b196d079a50a2f0950a7ea87653c875a69eebf94da1c3605fe893c57

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensoul-0.1.8.tar.gz:

Publisher: release.yml on ssttkkl/tensoul-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tensoul-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: tensoul-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tensoul-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1ee2718c4c981ebfeec3de251b7da9319d16fd2c7f815ba16350f7250dfb99d9
MD5 f333037ea00b91f5de4e62296b2ff9a0
BLAKE2b-256 72b176a14da86ab2392373d368f9c85ad59b0ea6a01d86d933f897961f553300

See more details on using hashes here.

Provenance

The following attestation bundles were made for tensoul-0.1.8-py3-none-any.whl:

Publisher: release.yml on ssttkkl/tensoul-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page