Hi all,

My real name is Bogdan. This is my first blog ... ever.

Before you start reading or closing here read this :

All the actions except you composing the hand is one time only (installing Python, Notepad++ and command window setup). They are all freeware software. It will require you to keep a command window open. The script is plain and simple, does not connect to anything, the net or any kind of database, it is for personal use only, it is not fully tested, it is intended to speed up the note taking by means of : hand composing and copy paste with a simple visual effect in one line that you can put in the PS client. In short is a simple hack.

OK, as I am not used to it and nor do I like to write much it is going to be fairly short.

I am a DB programmer, and a script enthusiast and it is going to be a bit technical at first and some actions on your part will be necessary but I will try to keep it as simple and intuitive as possible.

You, or most of you, have trouble, like me, in taking notes on a timely manner. This post is for you, and maybe can help others aswell.

Ok. First : software you need.

Python (is like JAVA a scripting language) : Download the windows installer (linux dudes you know you have it already ) on the page https://www.python.org/ftp/python/2.7/python-2.7.msi (32 bit) or https://www.python.org/ftp/python/2.7/python-2.7.amd64.msi (64 bit) and use the installer (Next > Next approach to it)

Notepad++ http://notepad-plus-plus.org/download/v6.6.8.html (don't worry this is not a coding lesson ) and also is only mandatory if you want the cool stuff at second part.

FIRST PART (you installed Python )

Copy and paste the following code in one of your editing programs (Notepad that comes with windows is cool) :

def convert(v_hand):
    a = v_hand
    if 'H' in a:
        a = a.replace('HJ','hj')
        a = a.replace('H', ' '+chr(3)+' ')
        a = a.replace('hj', 'HJ')
    if 'D' in a:
        a = a.replace('D', ' '+chr(4)+' ')
    if 'C' in a:
        a = a.replace('CO','co')
        a = a.replace('C', ' '+chr(5)+' ')
        a = a.replace('co','CO')
    if 'S' in a:
        a = a.replace('SB','sb')
        a = a.replace('S', ' '+chr(6)+' ')
        a = a.replace('sb','SB')
    print a

vh = raw_input('Convert hand : ')
vh = vh.upper()
while vh.strip() != 'shoimisawsome!'.upper():
    convert(vh)
    vh = raw_input('Convert hand : ')
    vh = vh.upper()

Two things when you copy paste from here :

1. at very begining the def word gets a space in front of it, remove it

2. at the very bottom the blog adds automatically a Read more note, remove that aswell.

Save it as hand_converter.py to your convinience (for the sake of simplicity c:\hand_converter.py)

Cool, now open a command window (WIN+R) type cmd, that is the windows button on your keyboard at the same time with R button that will open the run window where you type cmd  and press Enter, that will bring up the command window.

To further make this usefull (as in faster) you need to tweak your command window (I will guide you through by means of text as putting up images takes a lot of time posting them and linking them)

Ok. You opened your cmd window, now right click the title bar (the one at the very of top of the window). On the contextual menu click Properties, this will open a window with 4 tabs labeled : Options / Font / Layout / Colors. Select Options and look for a check box named Quick Edit mode, and check it then close the dialog window. This will allow you to select the text result as you would in Word and, once selected, if you right click the selected text it will copy the content so that you can CTRL+V (paste it) wherever you want. This will take a bit of time to practice but you will love it .

If you installed Python ok and saved the code to c:\hand_converter.py (or any other extension, default .txt extention will work aswell) then type the following in your command window :

python c:\hand_converter.py and hit ENTER

if you saved it to hand_converter.txt then it is : python c:\hand_converter.txt and hit ENTER

Be sure to type the whole file path as above (you can keep it somewhere for copy pasting)

And now here comes the tricky part, knowing how to write a shorthanded version of the hand you want to pass to the script. I want to know what actions my opps take and came up to this :

MP : UTG [AHAS] R/R [2SJcTH] x/- [9s] x/r

There is no matter if you are using upper case letters or not, my script upper cases it.

Write it into the command window (or select my sample CTRL+C and right click on the command window) when you are presented with the Convert hand : and hit Enter

The result should be :

MP : UTG [A ♥ A ♠ ] R/R [2 ♠ J ♣ T ♥ ] X/- [9 ♠ ] X/R

I haven't tested it with old version of the client but with the new one you can copy paste it to PS notes and it shows exactly that. (for russian, chinese or other languages with special chars it can lead to undesirable results, it is only tested for English)

Limitations :

1. The call is shorthanded as  - (minus sign on the keyboard) and not c or C as it can mean club and for me - signals a flat

2. Don't put S B or C O or H J for the positions keep it SB, CO and HJ as they are hardcoded without spaces (UTG, MP and BB are ok as they don't interfere with other shorthanded chars.. I think)

3. This is a script to shorthand the actions, not an impersonation of advanced analysis, that is up to you, and also I present here a one liner note taking system that with imagination can be done and presented in the client.

4. It's a simple script that you need to keep running as you play, don't expect much out of it, but for me it solves a complex problem in a time limited environment.

OOOk.

That's it for now, if it gets published and comments I will show you how you can set up Notepad++ to actually show colors like this (it's simple, but I am tired right now, just wanted to share this fast)

http://imgur.com/3tpoabJ

Hope this helps some of you, put your imagination at work and cool things can happen.

My use of Python is arbitrary, if you have the knowledge now you have the idea, if you want to use it please do, if you want to share it is ok but if you mention me is cooler

 

Cheers,

Shoim