GithubHelp home page GithubHelp logo

hhp's Introduction

hhp build status

become a patron

Poker HandHistory Parser

Status

Parses PokerStars, Ignition, PartyPoker and Pacific (888) Hold'em hands, tourneys, SNGs and Cash.

Installation

npm install hhp

API

parseHand

Parses PokerHand Histories as output by the given online Poker Rooms. Autodetects the game type and the PokerRoom.

The parsed hands can then be further analyzed with the hha module.

As an example this hand is parsed into this object representation.

Parameters

  • input string the textual representation of one poker hand as written to the HandHistory folder
  • opts object? various options
    • opts.infoOnly boolean? denotes that only the header line of the hand is parsed and only the info object returned
    • opts.buyinFile string? file name overrides buyin for rooms that don't include it in the history like Ignition

Returns object representation of the given hand to be used as input for other tools like hha

canParse

Determines if any of the parsers can parse the passed hand(s).

Parameters

Returns Boolean true if it knows how to parse this text

extractHands

Extracts all hands from a given text file.

Parameters

  • txt string the text containing the hands

Returns Array<Array> an array of hands, each hand split into lines

parseHands

Parses multiple hands from a given text.

Parameters

  • input string the textual representation of the poker hands as written to the HandHistory folder
  • opts object? various options, passed along to parseHand

Returns object parsed hands and errors encountered: { parsedHands: Array, errors: Array, count: Number }

License

MIT

hhp's People

Contributors

thlorenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hhp's Issues

Zoom Tables

Noticed that Zoom tables weren't being picked up. Tracked this down to a difference in the _handInfoRx regex.

The info line that I'm seeing is

PokerStars Zoom Hand #149651992548:  Hold'em No Limit ($0.02/$0.05) - 2016/07/03 21:11:35 ET

I originally thought this would be an easy issue and PR, simply add in optional regex bits for the Zoom etc. I am now thinking it might be a bit more complicated due to the _handleInfoRx being used to isolate variables in _readInfo to generate this.hand.info, in particular, the matching indices are used. Those indices are not the same between the two strings.

The only feasible way I can see adding zoom table support in, is if each module in lib/holdem/ contains a function that returns info, rather than relying on base to perform this action based on a regex.

Thoughts?

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.