Create batch script to identify + replace a variable in poker hand history txt files

  • Posted:
  • Proposals: 1
  • Remote
  • #217934
  • Completed
Frank C. has already sent a proposal.
  • 0

Description

Experience Level: Intermediate
We need a batch script creating (DOS/WINPC) that identifies which player is in which position (taken from the hand history file), and replaces that player's name with a generic name (e.g. HERO1) throughout that hand history (hh).

Attached is an example of a typical file which contains multiple hh for which we wish for the batch script to be able to run on (ideally we'd be able to run the script on 1000s of these files).

Firstly, the script needs to able to be modified (user input is preferred) to specific which seat position we require - button(btn), small(sb) and big blind(bb) are defined but the other positions such as cutoff(co), hijack(hj) and under-the-gun(utg) need to be figured out based on how many players are at the table (simply by count of names in seats).

For those that don't know how the seats work at a 6-max(players) poker table, in sequential order:-

6 players: utg, hj, co, btn, sb, bb
5 players: hj, co, btn, sb, bb
4 players: co, btn, sb, bb
3 players: btn, sb, bb
2 players: sb, bb

Once the specific position we require has been set (e.g. co), the script should then be able to identify which player is the co, and then replace this player's name with a generic name like HERO1.

In the attached file, there are 3 hand histories (which I've duplicated to make things easier). At the start of each hand history, the script will need to re-identify which player is in the co and replace that player's name with HERO1, continuing on until all the hhs in a text file is complete, and all txt files in a specific folder are done.

Despite the specifics of this task and the poker 'lingo', this task should be straightforward for a competent programmer who is proficient at scripting.

We require the batch script asap (Feb 24th 2013 at the latest). If more detail is required, please send a request.

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.