Hand History Downloader

For general discussion of the Poker Mavens software
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Hand History Downloader

Post by strobe878 »

Hacked this together, figured it might be useful to other folks.

https://codepen.io/strobe878/pen/vEBWemK?editors=1000

Requirements
  • Pro or Gold license
  • Admin access
  • Desktop web browser only, no mobile support
  • Tested only on PM 7.20, other versions YMMV
Installation
  • Copy the linked HTML file
  • Open your Admin panel and paste into System > Web Settings > Head section HTML
Usage
  • To download hands, Lobby > Account > Download hand histories...
  • To clear saved hands, Lobby > Account > Clear hand histories...
How it works
Each hand is saved into your browser's IndexedDB storage and persists across page refreshes and browser restarts. Each player gets a unique database so if you are sharing a computer with another Mavens user the hands won't be overwritten. Note that anyone with access to your browser will be able to inspect the data.
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

I just made a small optimization and updated the linked code and have added a Version number at the top:

Code: Select all

<!-- Version 1 -->
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Oh . . . I realized this could be run as a UserScript by anyone without having the admin load it on the backend. Here is a version that works with the Tampermonkey browser extension: https://codepen.io/strobe878/pen/JoPOaxw?editors=1000

You just have to edit line 7 of the script to match your Mavens server URL.
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Updated the userscript to run on mobile and posted the script to GreasyFork: https://greasyfork.org/en/scripts/52294 ... tory-saver

For mobile you need the TamperMonkey app.
Grim
Posts: 94
Joined: Thu Oct 15, 2020 8:11 pm

Re: Hand History Downloader

Post by Grim »

I tested this on win10, Chrome and tampermonkey shows it running, it's enabled and all good but when I select download hand history, I get a popup saying No handhistories available for download. This happens after I left one table and are still sitting at another.

Edit: Running on PMavens 7.22 btw.
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Presumably you played some hands?
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Discord IMs might be more convenient for troubleshooting: https://www.briggsoft.com/forums/viewtopic.php?t=4069

My handle on there is also strobe878.
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Userscript fixed, Version 3. Wasn't handling tournament tables correctly.
Grim
Posts: 94
Joined: Thu Oct 15, 2020 8:11 pm

Re: Hand History Downloader

Post by Grim »

So a couple of things that struck me, I don't know how realistic this is as I don't know the capabilities nor limitations of userscripts and browsers, but here goes...
It would be nice to download the hh in bigger files, i.e. per session at a table. So all e.g. 108 hands on one table as one text file.

Some option for automation would also be cool, e.g. auto download either each hand (as a separate file) as it concludes or all hands as a single file when leaving a table. I think the former might be slightly more annoying than useful though.

One question though, if I refresh the browser now will it clear all hands?
strobe878
Posts: 34
Joined: Fri Nov 24, 2023 8:11 pm

Re: Hand History Downloader

Post by strobe878 »

Refreshing (or closing) the browser, logging out, etc., does not clear the hands. That is the main reason I wrote this script because I can never remember to download the history ;-)

Given that, the complexity around auto-downloading I think is not worth the effort. At least I'm not inclined to give it go.

I should be able to do a single file per session, that's a good idea.
Post Reply