Okay. Here's the deal. This is a script written in python so if you want to use it you will need to go to
www.python.org/download/ and download python. I used v2.6. If people don't want to/are unable to install python then I can probably make this available as a standalone executable. I chose to just give up the script since people are often (correctly) wary of running sketchy executables and this way people are free to modify/fix it when something inevitably doesn't work.
Instructions:
Make a new directory somewhere for the script. I used C:\Program Files\UBmine\ but it should work where ever you put it. Now create a new file in that folder called ub_mine.py and paste this code into it.
Code:
import os,shutil
import string
import time
from msvcrt import kbhit,getch
root_dir = os.getcwd()
#location of UB instant replay data files
replay_dir = "C:\Poker Application\UltimateBet\InstantReplay"
#move instant replay files to this directory after processing
converted_dir = root_dir+"/converted/"
#store the converted histories in this directory
hist_dir = root_dir+"/histories/"
#number of seconds to wait inbetween processing batches
sleep_time = 5
def main():
os.chdir(replay_dir)
#make directory to move processed hands to if it doesn't already exist
if not os.path.isdir(converted_dir):
try:
os.mkdir(converted_dir)
except:
print "failed to make converted hand directory"
raw_input("press any key to quit")
exit()
#make directory to store converted hand history file
if not os.path.isdir(hist_dir):
try:
os.mkdir(hist_dir)
except:
print "failed to make hand history directory"
raw_input("press any key to quit")
exit()
out_file = open(hist_dir+"converted.txt",'a')
stop = False
print "hit 'q' at any time to quit"
while not stop:
if kbhit() and getch() == 'q': stop = True
dirList=os.listdir(os.getcwd())
for fname in dirList:
if fname.find('.dat')!=-1:
if add_to_file(out_file,fname):
shutil.move(fname,converted_dir)
time.sleep(sleep_time)
out_file.flush()
out_file.close()
def add_to_file(f,fname):
try:
infile = open(fname,'r')
dat = infile.readlines()
for i,line in enumerate(dat):
dat[i] = dat[i].strip()
infile.close()
first = dat.index("[IHH]")
dat = dat[first+1:len(dat)-1]
hh = ''
for line in dat:
nxt_line = line.partition('=')[2]
hh += nxt_line+'\n'
f.write(hh)
except:
return False
return True
if __name__ == '__main__':
main()
Now you should be able to double click on this file in explorer or right click and open or run it from a command line or whatever you like to do.
When you run the script it will open a command window that won't look like it's doing anything. You can now open up a bunch of ub tables and it will start saving hands to a file called converted.txt in %your prog dir%\histories\ e.g. for the directory I used above this would be C:\Program Files\UBmin\histories\
Now go add that directory to Holdem Managers auto import and you should be good to go.
I think that's all, but I probably forgot something/screwed something up so let me know if you can't get it running and I will do what I can to fix it or help you through it. Oh, you might have to run this as administrator in Vista and I haven't tested it on XP but it should work.
Sorry it isn't commented or anything but I just threw this together v. quickly.
p.m. me if you want to ship me some percentage of all the money this is going to help you make