Renders PokerHands parsed with hhp to different formats, i.e. PokerStars and message boards.
const parse = require('hhp')
const analyze = require('hha')
const { script, summary } = require('hha')
const { renderHtml } = require('hhp-render')
const txt = fs.readFileSync(file, 'utf8')
const parsed = parse(txt)
const analyzed = analyze(parsed)
const scripted = script(analyzed)
const summarized = summarize(scripted)
const rendered = renderHtml({ summary })
console.log(rendered) // prints hand in html format
Renders to html, different forums and PokerStars.
Note that only for PokerStars a binary interface has been exposed.
Also all renderers require a script produced with hha
except for PokerStars which renders a hand that was parsed with
hhp
but not analyzed.
hhp-render <source-dir> <target-dir> --noreveal
Converts hand histories inside source dir to
PokerStars format and writes them to the target dir.
If --noreveal is NOT supplied revealed hands will be
included as mucked hands.
npm install hhp-render
Renders an hhp parsed hand in PokerStars format.
Parameters
hand
Object the parsed hand$0
Object options$0.muckRevealed
Object? iftrue
includes cards revealed via Ignition as mucks (optional, defaulttrue
)
Returns string hand rendered to be importable as PokerStars hand
Renders an hhp parsed + hha anazlyzed + scripted and then summarized hand to HTML format.
Parameters
$0
Object the configuration of the renderer$0.text
String? text to start with (optional, default''
)$0.summary
Object the parsed then analyzed, scripted and summarized$0.amountAsBB
Boolean? show all amounts in big blind dominatians (optional, defaultfalse
)$0.showHeroCards
Boolean? show hero cards as part of hands (i.e. don't hide in spoilers) (optional, defaulttrue
)
Returns String the rendered hand
Renders an hhp parsed + hha anazlyzed + scripted and then summarized hand to facebook format.
Parameters
$0
Object the configuration of the renderer (same asrenderHtml
)
Returns String the rendered hand
Renders an hhp parsed + hha anazlyzed + scripted and then summarized hand to 2+2 forum format.
Parameters
$0
Object the configuration of the renderer (same asrenderHtml
)
Returns String the rendered hand
Renders an hhp parsed + hha anazlyzed + scripted and then summarized hand to pocket fives forum format PokerXFactor, CardRunners, IntelliPoker formats are identical.
Parameters
$0
Object the configuration of the renderer (same asrenderHtml
)
Returns String the rendered hand
MIT