Skip to content

Adding a room parser

jejellyroll-fr edited this page Aug 8, 2026 · 2 revisions

Adding a room parser

How to make fpdb read a room it does not read today, or fix one it reads badly.

Read Architecture first for where the pieces sit.

Converted hands as they appear in the populated Hand Viewer

The three support tiers

Every converter sits in one of three tiers, recorded in PARSER_SUPPORT.md. Knowing which one you are working in tells you what is expected of your change.

Tier Means
Golden-covered File-by-file semantic snapshots in test/test_live_parser_regression.py. Behaviour is locked; a change that alters output fails the suite until the snapshot is deliberately updated.
Legacy Kept so old archives still import, with no claim about the room's current format.
Disabled Switched off in the application. The code and its tests stay in the tree.

The tiers describe test coverage, not a room's commercial availability in your country. A room can be perfectly available and sit in Legacy because nobody has contributed a fixture.

Golden-covered today: Bovada/Ignition, BetOnline, Cake, GGPoker, iPoker, KingsClub, PacificPoker/888, PartyPoker, PokerStars, SealsWithClubs, Unibet, Winamax, Winning Poker Network.

Fixing an existing converter

  1. Get a hand history that fails. Anonymise it — see below — and put it under tests/fixtures/hands/<room>/.

  2. Register it in the manifest. tests/fixtures/hands/live_parser_snapshots.json maps each fixture path to its expected hand count and a digest:

    "winamax/nlhe_cash.txt": { "hand_count": 1, "sha256": "…" }

    test_live_parser_regression.py globs each room directory and fails on any file the manifest does not cover, so adding a fixture without an entry breaks the suite. That is deliberate: it makes a silently untested fixture impossible.

  3. Run the suite, see it fail on your fixture, fix the converter, see it pass.

  4. Check nothing else moved. If another fixture's snapshot changed, your fix altered behaviour elsewhere — which is either the point, or a bug.

The snapshot covers identity, gametype, players, board, actions, winnings, pot and rake. A change that leaves all of those identical is a change the golden corpus considers a no-op, which is usually what you want from a refactor.

Adding a new room

  1. A new converter, <Room>ToFpdb.py, subclassing HandHistoryConverter. The existing ones are the specification; WinamaxToFpdb.py and PokerStarsToFpdb.py are the most complete.
  2. Recognition — IdentifySite.py has to be able to tell the room's files apart from every other room's.
  3. Configuration — a <site> entry and an <hhc> converter binding in HUD_config.xml.example.
  4. Table detection — a getTableTitleRe so the HUD can match window titles to tables. This is separate from parsing and is where a room usually fails after import already works.
  5. A summary importer, if the room writes tournament summaries separately.
  6. Fixtures and a manifest entry, as above. A converter without them lands in Legacy.

Moving a converter from Legacy to Golden-covered means exactly one thing: contributing a representative fixture and a snapshot covering identity, gametype, players, board, actions, winnings, pot and rake.

Anonymise before committing

Hand histories carry real screen names. A fixture is committed forever, and git history is not something a later deletion fixes.

Before adding one:

  • Replace every opponent's screen name with Player1, Player2, … and your own with Hero. Keep the replacement consistent across the file, or the parse will not mean anything.
  • Strip the account identifiers in the header where they are not what you are testing.
  • Keep hand ids, table names, stakes and timestamps — those are format, and the parser is being tested on them.

Some existing fixtures and much of regression-test-files/ predate this and still carry genuine names. That is a reason not to use them as demo data, not a licence to add more. For screenshots, use the generated demo database instead — Screenshots and privacy.

Reporting a room that does not import

You do not have to write the parser. A good report is a real contribution:

  • The room, the network, the country and the game format
  • The client version, and the platform
  • An anonymised hand history — the actual text, not a screenshot of it
  • What fpdb did: nothing at all, an error, or a partial import
  • The relevant part of the import log

Open it as an issue, and add the row to Compatibility online Rooms if it is not there.

Clone this wiki locally