Commit Graph

3623 Commits

Author SHA1 Message Date
sqlcoder
8cb73b822c set stats color to fgcolor 2010-01-01 22:57:25 +00:00
sqlcoder
378ad93f78 Merge branch 'master' of git://git.assembla.com/fpdboz 2010-01-01 16:27:01 +00:00
Worros
cd88de7c7e [NEWIMPORT] Copy in Alchemy files from Grigorij's alchemy branch 2009-12-30 15:44:48 +08:00
Mika Bostrom
478b82587d Store names as UTF-8
The names should be always in UTF-8 encoding. At least for PostgreSQL
the encdoding of the database comes from the time of running 'initdb'
(which is different from 'createdb') and if the encoding was selected or
set to something else at that time, the following error will occur:

  File ".../pyfpdb/Database.py", line 1630, in <lambda>
    self.pcache = LambdaDict(lambda  key:self.insertPlayer(key, siteid))
  File ".../pyfpdb/Database.py", line 1661, in insertPlayer
    c.execute (q, (site_id, _name))
  File "/usr/lib/python2.5/encodings/iso8859_15.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2122' in
position 10: character maps to <undefined>

This happens because 'name' is a regular string as opposed to a valid
unicode object. By forcing the string to unicode and encoding it in
UTF-8 the error goes away. In my case the database encoding was
ISO-8859-15 (latin9) but any other "wrong" encoding would trigger the
same problem.

This is a relatively common problem in python.
2009-12-29 13:05:03 +08:00
Worros
4800f2515f Update HUD_config.xml
- Change default Holdem stat window layout to 3x3, add some more colouring
- Fix tab breakage from Gerko.
2009-12-28 22:09:06 +08:00
Worros
c7aca0a32e Update HUD_config.xml
- Change default Holdem stat window layout to 3x3, add some more colouring
- Fix tab breakage from Gerko.
2009-12-28 22:03:26 +08:00
Gerko de Roo
1cf464283f Hmm forgot the color reset to default.
There must be a better methode
2009-12-28 10:41:22 +08:00
Gerko de Roo
6efccd9067 Hmm forgot the color reset to default.
There must be a better methode
2009-12-28 10:41:04 +08:00
Worros
3f3d8ac54a Fix tab spacing from Gerkos recent patch 2009-12-28 10:22:44 +08:00
Worros
805d35c3fd Fix tab spacing from Gerkos recent patch 2009-12-28 10:21:31 +08:00
Gerko de Roo
eb226c0026 Added color highlight for stats window.
high and low threshold and color can be set in the xml file
2009-12-28 10:17:01 +08:00
Gerko de Roo
2cd57e826d Added color highlight for stats window.
high and low threshold and color can be set in the xml file
2009-12-28 10:16:48 +08:00
Gerko de Roo
3553bdaf71 search string for table detect changed 2009-12-28 10:14:04 +08:00
Gerko de Roo
f66b8307d3 search string for table detect changed 2009-12-28 10:04:33 +08:00
steffen123
b772ba49ce raise fpdbparseerror on a bug 2009-12-27 03:04:23 +00:00
Worros
0e318e6d9f [NEWIMPORT] Commit currnetly failing test - sawShowdown
It would appear that all-in pre-flop doesn't flag sawShowdown.

Also modified the query to select street0Aggr, as that appears to be wrong at the moment
2009-12-26 17:18:05 +08:00
Worros
9f2f015fd0 New test for all-in preflop.
Test still fails - need to sort out an issue with database placement
2009-12-26 12:25:05 +08:00
Worros
1245a0cab3 New test file - All-in pre flop 2009-12-26 12:24:41 +08:00
Worros
624ab07f85 New test for all-in preflop.
Test still fails - need to sort out an issue with database placement
2009-12-26 12:23:20 +08:00
Worros
1bcb6736eb New test file - All-in pre flop 2009-12-26 10:07:33 +08:00
Worros
46e91e1a0f [NEWIMPORT] Remove a couple of unused functions 2009-12-25 18:55:13 +08:00
Mika Bostrom
3b1e67e78b Store names as UTF-8
The names should be always in UTF-8 encoding. At least for PostgreSQL
the encdoding of the database comes from the time of running 'initdb'
(which is different from 'createdb') and if the encoding was selected or
set to something else at that time, the following error will occur:

  File ".../pyfpdb/Database.py", line 1630, in <lambda>
    self.pcache = LambdaDict(lambda  key:self.insertPlayer(key, siteid))
  File ".../pyfpdb/Database.py", line 1661, in insertPlayer
    c.execute (q, (site_id, _name))
  File "/usr/lib/python2.5/encodings/iso8859_15.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2122' in
position 10: character maps to <undefined>

This happens because 'name' is a regular string as opposed to a valid
unicode object. By forcing the string to unicode and encoding it in
UTF-8 the error goes away. In my case the database encoding was
ISO-8859-15 (latin9) but any other "wrong" encoding would trigger the
same problem.

This is a relatively common problem in python.
2009-12-24 09:52:47 +02:00
Gerko de Roo
9a145e14ad Hmm forgot the color reset to default.
There must be a better methode
2009-12-23 21:44:55 +01:00
Gerko de Roo
7a17d96a89 Added color highlight for stats window.
high and low threshold and color can be set in the xml file
2009-12-23 21:15:55 +01:00
Gerko de Roo
f1e6b597a2 search string for table detect changed 2009-12-23 21:12:56 +01:00
Gerko de Roo
207277e55a merged 2009-12-23 20:42:48 +01:00
Gerko de Roo
bb650e81a9 import latest 2009-12-23 20:40:29 +01:00
Worros
f8dccd43a3 Add ability to import Stars archive files.
PokerStars support can provide a HH archive. The format is similar but not the same as a a standard hh format as it contains an additional line "Hand #X" between each hand.

Patch adds an option -s to GuiBulkImport, which when specified will strip these lines out and continue parsing.
2009-12-24 03:10:07 +08:00
Worros
4c49d7163b [NEWIMPORT] Syntax fix 2009-12-24 03:09:13 +08:00
Worros
ff88823c1a [NEWIMPORT] Fix syntax to be 2.5 compatible.
Python 2.6 enumerate() function contains a useful 'start' paramater,
apparently this did not exist in 2.5.

Patch frim Mika Bostrom
2009-12-24 03:09:13 +08:00
Worros
9650fe7a0d [NEWIMPORT] Add stubbed variable to insert 2009-12-24 03:09:13 +08:00
Worros
ff0872f8de Add some code to kinda detect hand cancellation
hhc.readHandInfo(self)
hhc.readPlayerStacks(self)
hhc.compilePlayerRegexs(self)
hhc.markStreets(self)

Is the order, the first correctly failing regex is markStreets
2009-12-24 03:09:12 +08:00
Worros
e18af681cb Add test hand - Hand cancelled 2009-12-24 03:09:12 +08:00
Worros
f829ed937e [NEWIMPORT] Move hud call to after database commit
HUD still doesn't quite work, but getting closer - suspect hud_cache rebuild isn't happening
2009-12-24 03:09:11 +08:00
Worros
03deefc1a3 [NEWIMPORT] Fix thinko on insertPlayer
Was returning the player name instead of id in the case where the player exists in the database, but wasn't cached already

Removing some merge gunge too
2009-12-24 03:09:11 +08:00
Worros
72cf9a61ca [NEWIMPORT] Add a commit at the end of the fpdb_import cycle 2009-12-24 03:09:10 +08:00
Worros
5e4cc1c5eb [NEWIMPORT] 'correct' the type for wonWhenSeenStreet1 2009-12-24 03:09:10 +08:00
Worros
a717eb437c [NEWIMPOR] Fix insert type for wonAtSD 2009-12-24 03:09:10 +08:00
Worros
c1464d64ff [NEWIMPORT] Fix startCash fix 2009-12-24 03:09:09 +08:00
Worros
b3d6da8339 [NEWIMPORT] Convert start stack to cents 2009-12-24 03:09:09 +08:00
Worros
f527fe60a8 Fix a couple of typos 2009-12-24 03:09:08 +08:00
Worros
22a0c75adf Fix thinko in stub 2009-12-24 03:09:08 +08:00
Worros
318cd10551 [NEWIMPORT] Move HandsPlayers insert statement into SQL.py 2009-12-24 03:09:08 +08:00
Worros
0b711628f9 [NEWIMPORT] Stub remaining HandsPlayers stats 2009-12-24 03:09:04 +08:00
sqlcoder
d0725f8787 reload profile after editing Prefs if no other tabs are open, otherwise suggest restart 2009-12-24 03:09:03 +08:00
Carl Gherardi
e62c47f963 [NEWIMPORT] Move database prep into prepInsert 2009-12-24 03:09:03 +08:00
Carl Gherardi
c8734604c7 [NEWIMPORT] Enable printInsert, disable hud pipe 2009-12-24 03:09:02 +08:00
sqlcoder
2470b9a292 add name to nodes 2009-12-24 03:09:02 +08:00
sqlcoder
eaa698eb1a default guiprefs window to larger size 2009-12-24 03:09:02 +08:00
Worros
3584e6dcc1 [NEWIMPORT] Add call to HUD for auto import
Make sure the matching db_handid is recorded in the Hand object for later use
2009-12-24 03:09:00 +08:00