Tenhou Log Utils is command line tools, written in Python, to analyze game log of online mahjong Tenhou.net.
ๅคฉ้ณณใญใฐใฆใผใใฃใชใใฃใฏใชใณใฉใคใณ้บป้ใตใคใ tenhou.net ใฎใฒใผใ ใญใฐใ่งฃๆใใใใใฎใณใใณใใฉใคใณใใผใซใงใใ
Tenhou Log Utils
ไปฅไธใฎใใจใใงใใพใใ
-
Pick up IDs of the games you played form Flash player cache.
ใญใผใซใซใใฃในใฏใซไฟๅญใใใฆใใ Flash Player ใฎใญใฃใใทใฅใใใไปใพใงใซใใฌใคใใๅใฎใญใฐ ID ใใชในใใขใใใ
-
Download
mjlog
file from tenhou.net.mjlog
ๅฝขๅผใใกใคใซใใใฆใณใญใผใใ -
View
mjlog
file in console.mjlog
ๅฝขๅผใใกใคใซใฎไธญ่บซใใณใณใฝใผใซใซ่กจ็คบใ
Once it's installed, you should be able to use command tlu
(stands for Tenhou Log Utilities).
You can use --help
to see how to use.
ใคใณในใใผใซใๅฎไบใใใจใtlu
ใณใใณใ (T
enhou L
og U
tilities ใฎ็ฅใงใใ) ใไฝฟใใใฏใใงใใ
--help
ใชใใทใงใณใงไฝฟใๆนใ่กจ็คบใใใพใใ๏ผ่ฑ่ชใฎใฟ๏ผ
tlu --help
This will print message like the following.
ไปฅไธใฎใใใชใกใใปใผใธใ่กจ็คบใใใพใใ
usage: tlu [-h] {view,list,download} ...
Utility for tenhou.net log files.
positional arguments:
{view,list,download}
optional arguments:
-h, --help show this help message and exit
Using list
sub command you can list up the information on your play history.
list
ใตใใณใใณใใไฝฟใใจใญใผใซใซใใฃในใฏใซไฟๅญใใใใฒใผใ ใฎๅฑฅๆญดใ่กจ็คบใงใใพใใ
tlu list
/Users/moto/Library/Preferences/Macromedia/Flash Player/#SharedObjects/XRF2TRTU/mjv.jp/mjinfo.sol:
file: 2017060503gm-0041-0000-da7fdf26
un0: jesse
un1: ใใ๏ผฟ
un2: Yakkuru
un3: ใฟใตใ
oya: 2
type: 65
sc: 143,-26.0,606,71.0,346,15.0,-95,-60.0
/Users/moto/Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/YSXJKZMQ/mjv.jp/mjinfo.sol:
file: 2017052413gm-0009-0000-2c57e05a
un0: jesse
un1: NoName
un2: toru.ysk
un3: ใใปใใ
oya: 1
type: 9
sc: 340,14.0,131,-27.0,80,-42.0,449,55.0
...
You can use --id-only
option to only show log IDs. You need these IDs to download play log from tenhou.net.
--id-only
ใชใใทใงใณใไฝฟใใใจใง ID ใฎใฟใ่กจ็คบใใใใจใใงใใพใใใใใใไฝฟใฃใฆ tenhou.net ใใใฒใผใ ใฎใญใฐใใใฆใณใญใผใใใใฎใซๅฟ
่ฆใซใชใใพใใ
tlu list --id-only
2017060503gm-0041-0000-da7fdf26
2017052413gm-0009-0000-2c57e05a
2017052414gm-0009-0000-b0b25432
2017052514gm-0009-0000-df77ea6e
2017052514gm-0009-0000-e9f23937
2017052514gm-0009-0000-69a2af52
2017052515gm-0001-0000-42e80591
2017052612gm-0009-0000-815ed634
2017053113gm-0009-0000-6a4d36ba
2017053114gm-0009-0000-2294be5f
2017060213gm-0009-0000-a0c95a8f
2017060314gm-0009-0000-3b2aa4ca
2017060409gm-0001-0000-87fec10c
2017060409gm-0001-0000-f9ade363
2017060413gm-0009-0000-1508d27d
With download
sub command, you can download play log (mjlog
file). You need the log ID of the game you want to download.
download
ใตใใณใใณใใไฝฟใฃใฆใฒใผใ ใฎใใฌใคใญใฐ๏ผmjlog
ๅฝขๅผ๏ผใใใฆใณใญใผใใใใใจใใงใใพใใใใฆใณใญใผใใใใใฒใผใ ใฎ ID ใๅฟ
่ฆใซใชใใพใใ
Example)
The following command will download the play log with ID 2017060314gm-0009-0000-3b2aa4ca
to 2017060314gm-0009-0000-3b2aa4ca.mjlog
in the local storage.
ไปฅไธใฎใณใใณใใฏ ID 2017060314gm-0009-0000-3b2aa4ca
ใฎใฒใผใ ใญใฐใ 2017060314gm-0009-0000-3b2aa4ca.mjlog
ใซใใฆใณใญใผใใใพใใ
tlu download 2017060314gm-0009-0000-3b2aa4ca 2017060314gm-0009-0000-3b2aa4ca.mjlog
You can use view
command to see the content of a mjlog
file.
view
ใณใใณใใไฝฟใฃใฆ mjlog
ใใกใคใซใฎไธญ่บซใ่กจ็คบใงใใพใใ
tlu view 2017060314gm-0009-0000-3b2aa4ca.mjlog
Lobby 0:
test: False
red: True
kui: True
ton-nan: True
sanma: False
tokujou: False
soku: False
joukyu: False
Players:
Index: Dan, Rate, Sex, Name
0: 7, 1601.97, M, AlyBBBMe
1: 3, 1558.81, M, jesse
2: 0, 1484.34, M, ใใฃใฝใ3ๅท
3: 0, 1500.00, M, NoName
Dealer: 0
========================================
Initial Game State:
Round: 0
Combo: 0
Reach: 0
Dice 1: 3
Dice 2: 3
Dora Indicator: ๐
0
Initial Scores:
0: 25000
1: 25000
2: 25000
3: 25000
Dealer: 0
Initial Hands:
0: ๐ 2 ๐ 2 ๐ 1 ๐ 0 ๐ 3 ๐ก 0 ๐ 0 ๐ 3 ๐ 3 ๐ 3 ๐ 3 ๐ 1 ๐ 3
1: ๐ 2 ๐ 3 ๐ 3 ๐ 3 ๐ 2 ๐ 2 ๐ 3 ๐ 3 ๐ 3 ๐ 1 ๐ 0 ๐ 2 ๐ 3
2: ๐ 0 ๐ 0 ๐ 3 ๐ 2 ๐ 1 ๐ 1 ๐ 2 ๐ 3 ๐ 0 ๐ 1 ๐ 0 ๐ 3 ๐ 1
3: ๐ 3 ๐ 1 ๐ 3 ๐ 1 ๐ 0 ๐ 3 ๐ 1 ๐ 1 ๐ 0 ๐ 2 ๐ 2 ๐ 1 ๐ 1
Player 0: Draw ๐
2
Player 0: Discard ๐
2
Player 1: Draw ๐ 0
...
Player 3: ChanKan from player 1: ๐ 2๐ 1๐ 0๐ 3
Player 3: Draw ๐ 2
New Dora Indicator: ๐ 1
Player 3: Discard ๐ 1
Player 0: Chi from player 3: ๐ 1๐ 3๐ 0
Player 0: Discard ๐ 3
Player 1: Draw ๐ 1
Player 1: Discard ๐ 1
Player 2: Draw ๐ 0
Player 2: Discard ๐ 0
Player 3: Chi from player 2: ๐ 0๐ 0๐ 0
Player 3: Discard ๐ 3
Player 0: Draw ๐ 3
Player 0: Discard ๐ 3
Player 1: Draw ๐ 0
Player 1 wins.
Tsumo.
Hand: ๐ 2 ๐ 3 ๐ 2 ๐ 3 ๐ 2 ๐ 3 ๐ 0 ๐ 1 ๐ 3 ๐ 0 ๐ 1 ๐ 3 ๐ 3 ๐ก 3
Machi: ๐ 0
Dora Indicator: ๐ 1 ๐ 1
Ura Dora: ๐ 3 ๐ 0
Yaku:
Reach ( 1): 1 [Han]
Tsumo ( 0): 1 [Han]
Pin-fu ( 7): 1 [Han]
Ii-pei-ko ( 9): 1 [Han]
Ikki-tsuukan (24): 2 [Han]
Chin-itsu (35): 6 [Han]
Ura-dora (53): 0 [Han]
Fu: 20
Score: 36000
- Sanbaiman
Ten-bou:
Combo: 0
Riichi: 1
Scores:
35700: -120
6800: 370
55700: -120
800: -120
Final scores:
23700: -16.0
43800: 53.0
43700: 24.0
-11200: -61.0
Use the following command to install TLU.
ไปฅไธใฎใณใใณใใงใคใณในใใผใซใงใใพใใ
pip install git+git://github.com/mthrok/tenhou-log-utils.git
If you want to modify the command line, you can install in editable mode.
git clone http://github.com/mthrok/tenhou-log-utils
cd tenhou-log-utils
pip install -e .
This will install the utility from the local repo, and you can change the behavior by modifying the content of tenhou_log_utils
directory.
ใใใงใณใใณใใใฏใญใผใณใใใฌใใธใใชใๅ็
งใใใใใซใคใณในใใผใซใใใพใใtenhou_log_utils
ใฎไธญใฎในใฏใชใใใ็ทจ้ใใใใจใงใใณใใณใใฎๆๅใๅคๆดใงใใพใใ
Please file a bug report at issues page. Ideas and suggestions are also welcome.
ใใฐใ็บ่ฆใใๅ ดๅใฏ ใใกใใซๅ ฑๅใใ้กใใใพใใๆฉ่ฝๆนๅ่ฆๆใใฉใใใๆฅๆฌ่ชใงใkใ