Giter Club home page Giter Club logo

pokerstars-statistics-script's Introduction

PokerStars Statistics

This script is designed to track poker game history and uses console.log to print statistics to the terminal.

This script supports only play money

Supported Games

Features

The script keeps track of the count of played hands for each supported game, including both cash and tournament games. Games with zero counts are not printed (customizable from the .env file).

The script attempts to detect the localization from your system, with a default value of "en-US". You can also set this in the .env file.

For tournaments and sit & go's, it tracks:

  • Total games played
  • Total wins
  • Winning percentage
  • Tournament earnings
  • Paid buy-ins & re-entries
  • The difference between wins and buy-ins & re-entries
  • Earnings compared to costs (percentage value)

Example output of script time when readme is updated. (fi-FI) localization, minimun played hands for game is 10 to show in statistics

--- Played hands by game ---
Hold'em No Limit         1 607
Hold'em Limit            488
Omaha Hi/Lo Limit        475
Razz                     467
7 Card Stud              427
7 Card Stud Hi/Lo        418
Triple Draw 2-7 Lowball  389
Omaha Pot Limit          366
------------------------------
All played hands         4 647

--- Tournament, sit & go statistics ---
Total games                   23
Total wins                    7
Winning percentage            30,43 %
Earned money                  943 625
Paid buy-ins (and rebuys)     580 000
Diff on buy-ins and winnings  363 625
Earnings compared to costs    62,69 %

Environment variables and requirements

You need Node 17 (lower versions may be okay, not tested). The script may not work with Node >= 20.0.6 because dotenv is built-in.

If you have PokerStars installed on the default path and only one player account, the script will attempt to automatically detect the necessary environment variables if none are set. Otherwise, you need to set folder paths and player name manually in the .env file on the project root.

Localization and showing a minimum of played hands in statistics are optional.

There is a .env.example with instructions on what it should look like. If you do not provide an .env file, the script will try to detect these values from your operating system.

Example of .env file

# Name actual env file .env on project root
# You must set these three (HAND_HISTORY_FOLDER_PATH, TOURN_HAND_HISTORY_FOLDER_PATH, PLAYER_NAME)
# If you want try to script may be able to get these values automatically, build project without .env file.
# If build fails, then you need to set .env file
HAND_HISTORY_FOLDER_PATH="C:\Users\Windows_User\AppData\Local\PokerStars\HandHistory\Player_Name"
TOURNAMENT_STATISTICS_FOLDER_PATH="C:\Users\Windows_User\AppData\Local\PokerStars\TournSummary\Player_Name"
# This is needed if you give path but you have multiple accounts/player names in history folder
PLAYER_NAME="Player-name"

# Optional, default value "en-US"
# This can be removed
LOCALIZATION="fi-FI"

# Optional, don't show games played under n hands
# By default show all games which are played even once
# This can be removed
MIN_GAMES_SHOW=10

Building the project

Run the following commands in the root to install dependencies and build the project:

npm install
npm run build

To run the statistics, use the command:

npm start

or

node dist/index.js

I recommend creating for example a bash script for this. I have the following bash script set as an alias

START_DIR=$(PWD)

cd /C/Users/<some path>/pokerstatistics/dist
clear
node index.js
cd $START_DIR

exit 0

Bugs

Please open an issue on GitHub if you find a bug. There may be a few. Also open an issue if you encounter problems with installation or anything else.

Feature Suggestions

Please open an issue on GitHub. I am open to new suggestions.

I'm open-minded for all kinds of discussions

pokerstars-statistics-script's People

Contributors

jantero93 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.