Converting old Shanky .txt profiles

Coding-related discussion: OpenPPL (Poker Programming Language) and internal OpenHoldem-script
Alex
Site Admin
Site Admin
Posts: 2953
Joined: Sun Mar 26, 2017 5:58 pm

Converting old Shanky .txt profiles

Post by Alex »

Here's approach i use to convert old Shanky .txt profiles to .oppl format.
I used script from OpenHoldem forum, but modified it, and also added some Perl scripts for better convertion.

Steps:
1) Download and install Perl: https://www.activestate.com/products/ac ... downloads/
2) Download "boards.pl" and "UsersUpper.pl" files (attached), and unzip them in "Perl/bin" folder
3) Download "PPL2OpenPPL_mod.zip" (attached) and unzip files to some new folder
4) Open your .txt profile and delete first block, until "custom". Make sure that "custom", "preflop", "flop" , "turn" and "river" are all lower-cases, with no additional spaces/tabs in those strings. Save .txt file
It should look like:

Code: Select all

custom
preflop
.........
flop
.........
turn
.........
river
........
5) Copy your .txt profile to "Perl/bin" folder, and inside this folder run this command line:

Code: Select all

perl.exe boards.pl < myprofile.txt > boards_myprofile.txt
change "myprofile.txt" to your profile name
6) Now run "PPL2OpenPPL_mod.exe" script, select your "boards_myprofile.txt" and wait until it converts it to .oppl file (for example "boards_myprofile.oppl")
7) copy your new .oppl file into "Perl/bin" folder and run this command line:

Code: Select all

perl.exe UsersUpper.pl < boards_myprofile.oppl > final_myprofile.oppl
Boards.pl script fixes some boards symbols, like "board = K A T" into "board$KAT"
and UsersUpper.pl script makes all "userMyVariable" into "userMYVARIABLE" (upper-case). Because Shanky user symbols are not case-sensitive, unlike OpenHoldem (Warbot).

That's all for automated converting, but you will probably still need to fix some syntax errors manually. Also, keep in mind, that:

- all expressions like "PotSize = ", "BetSize = ", "StackSize = " must be replaced with "PotSize ~~ ", "BetSize ~~ ", "StackSize ~~ ".
"~~" means rounded value.
- watch for "Bets = 1" expressions in preflop section. In OpenHoldem (Warbot), "Bets" are always zero on preflop. So change it to "Bets = 0"
Attachments
PPL2OpenPPL_mod.zip
(427.55 KiB) Downloaded 521 times
PerlScripts.zip
(1.49 KiB) Downloaded 515 times
asd111
Low pair
Low pair
Posts: 33
Joined: Mon Apr 15, 2019 4:40 pm

Re: Converting old Shanky .txt profiles

Post by asd111 »

How can I convert .PPL to .txt? OH forum only explains .txt to .ohf or .oppl
Alex
Site Admin
Site Admin
Posts: 2953
Joined: Sun Mar 26, 2017 5:58 pm

Re: Converting old Shanky .txt profiles

Post by Alex »

asd111 wrote: Wed Apr 17, 2019 8:28 pm How can I convert .PPL to .txt? OH forum only explains .txt to .ohf or .oppl
.ppl is encrypted Shanky format, as i know, so it can't be converted.
But at first try to just open it in notepad and look inside - may be it's pure .txt profile, but renamed to .ppl
rem54
Botter for life
Botter for life
Posts: 597
Joined: Fri Apr 27, 2018 5:19 am

Re: Converting old Shanky .txt profiles

Post by rem54 »

It's encrypted txt not sure of the tool or methodology.
insaniak
Fish
Fish
Posts: 8
Joined: Sun Jul 21, 2019 7:46 pm

Re: Converting old Shanky .txt profiles

Post by insaniak »

What to do with lines like >= and <=? Its not converting for me.
Alex
Site Admin
Site Admin
Posts: 2953
Joined: Sun Mar 26, 2017 5:58 pm

Re: Converting old Shanky .txt profiles

Post by Alex »

insaniak wrote: Sun Jul 21, 2019 10:35 pm What to do with lines like >= and <=? Its not converting for me.
<= and => are fine, conversion not needed
profile57
Newbie
Newbie
Posts: 2
Joined: Sat Sep 28, 2019 7:23 pm

Re: Converting old Shanky .txt profiles

Post by profile57 »

Please help, this is my first time use Perl and I stuck at steps 5, done copy my txt profile to C:\Perl64\bin folder, how to run this command line? (perl.exe boards.pl < myprofile.txt > boards_myprofile.txt)

Example my profile name tight.txt
Need change to like this? perl.exe boards.pl < tight.txt > boards_tight.txt

Do you mean open pert.exe and paste inside boards.pl < tight.txt > boards_tight.txt or whole code?
Alex
Site Admin
Site Admin
Posts: 2953
Joined: Sun Mar 26, 2017 5:58 pm

Re: Converting old Shanky .txt profiles

Post by Alex »

profile57 wrote: Fri Oct 04, 2019 9:51 am Please help, this is my first time use Perl and I stuck at steps 5, done copy my txt profile to C:\Perl64\bin folder, how to run this command line? (perl.exe boards.pl < myprofile.txt > boards_myprofile.txt)

Example my profile name tight.txt
Need change to like this? perl.exe boards.pl < tight.txt > boards_tight.txt

Do you mean open pert.exe and paste inside boards.pl < tight.txt > boards_tight.txt or whole code?
you can run "cmd.exe" to open console, then navigate to your perl folder (use "cd" command) and then enter line from step 5.
Or another variant - use some file manager like "Total Commander", it's easier this way - just go into perl folder and enter command.

yes you will need to replace "myprofile" with your profile name of course.
And don't forget to unzip PerlScripts into your Perl folder
profile57
Newbie
Newbie
Posts: 2
Joined: Sat Sep 28, 2019 7:23 pm

Re: Converting old Shanky .txt profiles

Post by profile57 »

I open command prompt then how to use "cd" command? i type cd perl.exe boards.pl < tight.txt > boards_tight.txt but "The system cannot find the file specified."

I don't know how to use file manager like "Total Commander", where to run it? I'm using windows 10 pro

How to go into perl folder and enter command? where to enter? open perl.exe then paste "perl.exe boards.pl < tight.txt > boards_tight.txt" press enter thats it? I tried but nothing changed.
Alex
Site Admin
Site Admin
Posts: 2953
Joined: Sun Mar 26, 2017 5:58 pm

Re: Converting old Shanky .txt profiles

Post by Alex »

profile57 wrote: Fri Oct 04, 2019 9:54 pm I open command prompt then how to use "cd" command? i type cd perl.exe boards.pl < tight.txt > boards_tight.txt but "The system cannot find the file specified."

I don't know how to use file manager like "Total Commander", where to run it? I'm using windows 10 pro

How to go into perl folder and enter command? where to enter? open perl.exe then paste "perl.exe boards.pl < tight.txt > boards_tight.txt" press enter thats it? I tried but nothing changed.
https://www.c3scripts.com/tutorials/msdos/commands.html

check syntax for "cd" command.
There are number of file managers. Find them, test them, read their manuals. But command prompt is enough actually.
Post Reply