BBO Discussion Forums: Where is the spec for LIN files? - BBO Discussion Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Where is the spec for LIN files? Is there a public specification for LIN?

#1 User is offline   pottsca 

  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 2008-November-17

Posted 2008-December-28, 11:35

Is there a public specification for .lin files? If so, where can I find it?

It should be a modest project to write the equivalent of the viewer in a portable language, e.g. Python, so that non-Windows users can also use the hand records without being in the Flash client. I was going to try it but can't find the specification for the file format.

Then again, I'm bad at finding things. (:-<.
0

#2 User is offline   inquiry 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Admin
  • Posts: 14,564
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Amelia Island, FL
  • Interests:Bridge, what else?

Posted 2008-December-28, 12:30

Welcome to the BBO forum. As far as I know, there is no public specification of the lin file format that I am aware of, although several of the unique features of lin file format are posted in various places in this forum.

However, for what you want, the format of a single hand from myhands the format is so simple, anyone wanting to write such a tool should have no problem figuring it out. Here is a slam you recently played, in the lin file format...

Link your hand with bahir.

The lin file format for this was.....
pn|bahir,albertbeps,pottsca,cevennes06|st||md|2SQH25TAD6QKAC24TJ,S8TH3JD348JC378QK,S237JAH4679QDC59A,|rh||ah|Board 384|sv|e|mb|p|mb|1S|mb|p|mb|2H|mb|p|mb|4H|mb|p|mb|6H|mb|p|mb|p|mb|p|pg||pc|CK|pc|CA|pc|C6|pc|C2|pg||pc|SA|pc|S4|pc|SQ|pc|ST|pg||pc|S2|pc|SK|pc|HT|pc|S8|pg||pc|DA|pc|D3|pc|C5|pc|D2|pg||pc|DK|pc|D4|pc|C9|pc|D5|pg||pc|HA|pc|H3|pc|H4|pc|H8|pg||pc|H2|pc|HJ|pc|HQ|pc|HK|pg||pc|S9|pc|H5|pc|C3|pc|S3|pg||pc|DQ|pc|D8|pc|S7|pc|D7|pg||pc|C4|pc|C7|pc|H6|pc|S5|pg||pc|H9|pc|S6|pc|D6|pc|C8|pg||mc|12|

so bahir, first name after pn| was south, albertbeps was west, you were north. Perhaps that is enough to give you a clue as to what that means. You do notice that the player names is headed by a vertical bar and ends with one. In fact you see a lot of such bars. If you are writing your own display, you should leave off the st||. As you notice, west was the dealer, if you looked at several hands, you would find that the 2 before all such hands. If south was the dealer, a 1. You will need to work out the other numbers needed for north and west, it is not hard.

As for the hands, which player had the SQ singleton (SQ), the heart AT52 (H25TA)? Which hand had the ST8 (a comma followed by S8t)?
Figure that all, and you probably should be able to work out which hand is listed first, which second and so on. Note, only 3 of the 4 hands are shown in this format, so if you write your own tool, you will need to interpret the fourth hand.

On this hand, the bidding was,
P-1S-P-2H
P-4H-P-6H
P-P-P

and the opening lead was the CK, won by the ACE. So you can probably figure out how the bidding and play of the cards are encoded. At the end of the bidding and aat the end of each trick there is something that says the play stops, you will need to code something similar for yourself.
--Ben--

#3 User is offline   y66 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 5,953
  • Joined: 2006-February-24

Posted 2008-December-28, 22:08

Paul Bethe's Python program that converts LIN files to PBN is here. Good place to start.
If you lose all hope, you can always find it again -- Richard Ford in The Sportswriter
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users