diff --git a/pyfpdb/Tables.py b/pyfpdb/Tables.py index 6eaf1c93..54079425 100755 --- a/pyfpdb/Tables.py +++ b/pyfpdb/Tables.py @@ -342,6 +342,7 @@ def clean_title(name): for pattern in [' \(6 max\)', ' \(heads up\)', ' \(deep\)', ' \(deep hu\)', ' \(deep 6\)', ' \(2\)', ' \(edu\)', ' \(edu, 6 max\)', ' \(6\)', + ' \(speed\)', ' no all-in', ' fast', ',', ' 50BB min', '\s+$']: name = re.sub(pattern, '', name) name = name.rstrip() @@ -368,12 +369,12 @@ def discover_mac_by_name(c, tablename): if __name__=="__main__": c = Configuration.Config() - print discover_table_by_name(c, "Louie") + print discover_table_by_name(c, "Ringe") # print discover_tournament_table(c, "118942908", "3") - tables = discover(c) - for t in tables.keys(): - print tables[t] +# tables = discover(c) +# for t in tables.keys(): +# print tables[t] print "press enter to continue" sys.stdin.readline() diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index e4852853..b7ed1f07 100755 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -1005,7 +1005,15 @@ def parseTableLine(site, base, line): elif line.find("heads up")!=-1: maxSeats=2 - return {'maxSeats':maxSeats, 'tableName':line[pos1:pos2]} + tableName = line[pos1:pos2] + for pattern in [' \(6 max\)', ' \(heads up\)', ' \(deep\)', + ' \(deep hu\)', ' \(deep 6\)', ' \(2\)', + ' \(edu\)', ' \(edu, 6 max\)', ' \(6\)', + ' \(speed\)', + ' no all-in', ' fast', ',', ' 50BB min', '\s+$']: + tableName = re.sub(pattern, '', tableName) + tableName = tableName.rstrip() + return {'maxSeats':maxSeats, 'tableName':tableName} else: raise FpdbError("invalid site ID") #end def parseTableLine