Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to easily convert a PBN into a text file?

692 views
Skip to first unread message

Bud H

unread,
Feb 9, 2013, 6:27:52 PM2/9/13
to
I would like to be able to take a PBN file for a set of deals, and
transform it into a simple text file.

Anyone have a suggestion on how to do this easily?

I have tried using BBO's "Open Bridge Movie from your computer" to get
a LIN file and then using LinConverter to make a text file, but the
lin file that was saved from BBO only included the LAST deal and not
ALL deals.

And it would be nice to have a one step process or not much more than
that, if possible.

Bud H


Sample (very simple) PBN file


% PBN 1.0
[Generator "Big Deal version 1.2"]
[Board "1"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KQJ98..98652.KQT A4.QJT86.A73.984 765.95.KJT4.AJ75
T32.AK7432.Q.632"]

[Board "2"]
[Dealer "E"]
[Vulnerable "NS"]
[Deal "N:QJ74.KQ4.JT93.T5 6532.AJ52.K65.J7 AKT.98.A87.AK643
98.T763.Q42.Q982"]




Sample text type file (similar to that generated by LinConverter)


Brd 49 KQJ983
North 654
None J6
98

62 T5
AQJ9 87
8432 AQT9
Q72 AKT43

A74
KT32
K75
J65

--------

Brd 50 KQ73
East T72
NS JT97
64

T8 A42
KJ98654 Q
Q3 AK8642
75 AK2

J965
A3
5
QJT983


pgmer6809

unread,
Feb 10, 2013, 2:47:25 AM2/10/13
to
What are you planning to do with the text file?
If you are just going to print it out, then I imagine that the various
dealing programs have an option to import PBN and print in one of
several formats.
pgmer6809

Bud H

unread,
Feb 10, 2013, 3:21:08 PM2/10/13
to
Dealer4 dealing machine software does not appear to have a function to
export a text file.

BridgeComposer can export to a "DOS Duplimate" text file, but I'm not
that happy with the format and don't want a specified contract to show
up either. It looks like this:

Deal: 1 K864 T5 QT63 T83
Contract: 4H-West AJ2 K8764 KJ A75 QT73 AQJ92 982
9
OnLead: North 95 3 A754 KQJ642
Lead:
Result: makes


I know Richard Pavlicek has a Bridge File Converter program but I
don't find it that simple to use (despite being fairly adept at
computers, including the old DOS commands) and a friend of mine would
find it very difficult to use, most likely.

bridge...@gmail.com

unread,
Feb 10, 2013, 9:30:27 PM2/10/13
to
I am still not clear on what you need the text file for, but anyway

Dealer does have a way to print hand records. Could you print the hand records to a file and use that? There must be a way to suppress the DD analysis that can be generated.

Another alternative would be to visit the pbn home page.
There are quite a few utilities listed there that might be able to do what you want.
see http://home.iae.nl/users/veugent/pbn/pbn_software.htm
and then investigate batch-converter. You might even be able to contact the author. his homepage
http://www.kolumbus.fi/~w134648/kgb/
has a couple of email addresses on it.
good luck.
pgmer6809

Wes Powers

unread,
Feb 10, 2013, 9:32:02 PM2/10/13
to
On 2/10/2013 15:21, Bud H wrote:
>
> Dealer4 dealing machine software does not appear to have a function to
> export a text file.

Yes, it does. Click on "Print", then select "Print to text file".

The format is very close to what you want.

Wes


Travis Crump

unread,
Feb 10, 2013, 11:54:01 PM2/10/13
to
I would just like to point out for the record that the pbn file is a
text file[as opposed to a binary file]. Not sure what a better name for
what you mean is though.

Bud H

unread,
Feb 11, 2013, 2:30:07 AM2/11/13
to
> seehttp://home.iae.nl/users/veugent/pbn/pbn_software.htm
> and then investigate batch-converter. You might even be able to contact the author. his homepagehttp://www.kolumbus.fi/~w134648/kgb/
> has a couple of email addresses on it.
> good luck.
> pgmer6809- Hide quoted text -
>
> - Show quoted text -

I would like to have the deals in a format where it is easy to send by
email as fixed width text. That is the reason for my inquiry.

I have a feeling that if I can figure out Richard Pavlicek's batch
files in his BFC program, that would do the trick. I will re-check
the Dealer4 software, as I didn't see the Print to text option.

Bud H

Lorne

unread,
Feb 11, 2013, 6:37:29 AM2/11/13
to
On 09/02/2013 23:27, Bud H wrote:
> I would like to be able to take a PBN file for a set of deals, and
> transform it into a simple text file.
>

Bridge Analyser can produce a .txt file as below (open the pbn file and
save it in the BA file format, then choose save as text file from the
files menu):

-- This file was created by Bridge Analyser.


AKQ1094
Dlr: N J3
Love All K93
K2
J53 872
1082 9654
87 AQ6
Q10986 754
6
AKQ7
J10542
AJ3

Bidding:
S W N E
- P 1S P
2D P 3S P
6N P P P
Contract: 6N by S

Makeable Contracts:
C D H S NT
N: 2 5 6 6 6
S: 3 5 4 4 5
E: - - - - -
W: - - - - -


Bud H

unread,
Feb 12, 2013, 7:13:41 AM2/12/13
to
Thanks - you were correct and that will work fine.

Printing to a text file in Dealer4 looks like the sample below. You
have the option of having the double dummy information present or you
can choose to not have it displayed.


Bud H


Session: Saturday 12/15 Date: 2012.12.15

BD: 1 S-J72 Dlr: N
H-AJ632 Vul: None
D-K8
C-A95
S-A S-QT86
H-K7 H-Q5
D-Q9754 D-AJT63
C-KQJ82 C-76
S-K9543
H-T984
D-2
C-T43

<-Makeable contracts->
C D H S NT
= = = = ==
N - - 1 - -
S - - 1 - -
E 4 5 - - 2
W 4 5 - - 2
=========================================

BD: 2 S- Dlr: E
H-KJ83 Vul: N-S
D-KT643
C-Q654
S-74 S-AKQ962
H-AT7 H-Q6
D-AQ D-J975
C-KT9832 C-7
S-JT853
H-9542
D-82
C-AJ

<-Makeable contracts->
C D H S NT
= = = = ==
N - - - - -
S - - - - -
E 2 1 - 2 2
W 3 1 - 3 2
=========================================

Bud H

unread,
Feb 24, 2013, 8:13:14 PM2/24/13
to
Another method of turning a PBN file with several deals into standard
deal diagrams is to use BridgeComposer with the following commands:

Tools --> All Boards
Edit --> Select All
Board --> Copy As Plain Text

It will then look like this (first three boards shown):


1: N Deals, None Vul

North
S A3
H 85
D A1054
C K8643
West East
S J1086 S 97542
H 103 H 97
D Q763 D J982
C Q102 C J5
South
S KQ
H AKQJ642
D K
C A97
NS 7N; NS 7H; NS 6C; NS 3S; NS 3D; Par +1520
2: E Deals, N-S Vul

North
S QJ7
H Q643
D 854
C 642
West East
S 5 S A1032
H AK10985 H J7
D AJ73 D Q102
C Q9 C K1087
South
S K9864
H 2
D K96
C AJ53
EW 5H; EW 3N; EW 4D; EW 2C; EW 1S; Par -450
3: S Deals, E-W Vul

North
S AJ98
H 5
D QJ843
C Q75
West East
S 1054 S Q762
H QJ963 H K10
D 109 D A652
C J84 C K63
South
S K3
H A8742
D K7
C A1092
NS 4N; NS 3S; NS 4D; NS 4C; NS 1H; Par +430


richard...@gmail.com

unread,
Aug 10, 2018, 11:10:26 PM8/10/18
to

richard...@gmail.com

unread,
Aug 10, 2018, 11:13:06 PM8/10/18
to
On Saturday, February 9, 2013 at 4:27:52 PM UTC-7, Bud H wrote:
I am thinking about something similar. I am a retired electronic engineer with a master's in computer science. I program a bit in Python and I think this is very do-able. Why don't you email me at: richard...@gmail.com and we can compare notes.

Ars Ivci

unread,
Aug 11, 2018, 5:16:09 AM8/11/18
to
On 11-08-2018 06:13, richard...@gmail.com wrote:
> On Saturday, February 9, 2013 at 4:27:52 PM UTC-7, Bud H wrote:
>> I would like to be able to take a PBN file for a set of deals, and
>> transform it into a simple text file.

[...]

>
> I am thinking about something similar. I am a retired electronic engineer with a master's in computer science. I program a bit in Python and I think this is very do-able. Why don't you email me at: richard...@gmail.com and we can compare notes.
>

The question was asked in 2013. Let's hope OP is still around and reads
this group.

Lorne

unread,
Aug 11, 2018, 9:47:44 AM8/11/18
to
On 11/08/2018 04:10, richard...@gmail.com wrote:
> On Saturday, February 9, 2013 at 4:27:52 PM UTC-7, Bud H wrote:
>> I would like to be able to take a PBN file for a set of deals, and
>> transform it into a simple text file.
>>
A PBN file is a text file. If what you want to do is open it in notepad
or something similar just change the file extension from name.pbn to
name.txt and click it.

Wayne

unread,
Aug 11, 2018, 8:12:52 PM8/11/18
to
I am the creator of linconverter. I am pleased that someone is still using it. It became a little obsolete when the BBO forum changed as its original purpose was to convert lin files into the format required for forum posts, although I added other features. I stopped supporting it when I lost almost everything in a major computer failure and a kind technician who decided it was a good idea to wipe my hard drives. So I lost my code and all of my back ups.

To answer your question what I do now to extract data from pbn files or lin files for that matter is to input the file into a spreadsheet and then use text functions to strip the unwanted tags etc and manipulate it into the form that I want. It is easy from there to copy and paste it into a text editor and probably directly into your email.

The big advantage of this approach if you have moderate spreadsheet skills is that you get precisely what you want and not what someone else thinks that other people might want.
0 new messages