Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old December 31st 03, 12:52 AM
Dr. David Kirkby
 
Posts: n/a
Default pgn-extract

Anyone using pgn-extract

http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/

to work with pgn files on a UNIX or Linux system ??

I can't seem to get it to behave the way I think it should be. I don't
know its its a bug, or just my misunderstanding.

If I do

% pgn-extract -e dronai.pgn drkirkby-Perpersa.pgn

where dronai.pgn and drkirkby-Perpersa.pgn both have 1 game in them,
it matches only one game, not the two as expected.

Without the -e option, i.e.

% pgn-extract dronai.pgn drkirkby-Perpersa.pgn

it matches on both games as I expect, but it don't do this if I try to
use the -e option to convert openings to ECO clasifications.

I can't seem to specify another file, other than 'eco.pgn' for the pgn
- ECO classifications. If I convert the file to upper case, it still
seems to look for the lower case version:

% pgn-extract -e eco.PGN drkirkby-Perpersa.pgn
Unable to open the ECO file eco.pgn.

It don't quite seem to conform to the normal behaviour of UNIX
programs, but perhaps I'm just being silly.

Any thoughts?

Dr. David Kirkby.
  #2   Report Post  
Old December 31st 03, 06:33 AM
Ari Makela
 
Posts: n/a
Default pgn-extract

In article , Dr. David Kirkby wrote:
Anyone using pgn-extract

http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/

to work with pgn files on a UNIX or Linux system ??


Yes, I use quite a lot.


% pgn-extract -e dronai.pgn drkirkby-Perpersa.pgn

where dronai.pgn and drkirkby-Perpersa.pgn both have 1 game in them,
it matches only one game, not the two as expected.


The manual page states:

-eECO_file Perform ECO classification of games. The optional
ECO_file should contain a PGN format list of ECO lines.
Default is to use /usr/share/pgn-extract/eco.pgn as ECO_file.

i.e. the other files should have no games but the ECO list in PGN.
Matching the only one game may happen because dronai.pgn is handles as
a ECO lines list.

Any thoughts?


Could you please show what you have in your files?

--
Ari Makela no escaping it -
I must step on fallen leaves
http://arska.org/hauva/ to take this path (Suzuki Majoko)

  #3   Report Post  
Old December 31st 03, 05:47 PM
Dr. David Kirkby
 
Posts: n/a
Default pgn-extract

Ari Makela wrote in message .. .
In article , Dr. David Kirkby wrote:
Anyone using pgn-extract

http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/

to work with pgn files on a UNIX or Linux system ??


Yes, I use quite a lot.


% pgn-extract -e dronai.pgn drkirkby-Perpersa.pgn

where dronai.pgn and drkirkby-Perpersa.pgn both have 1 game in them,
it matches only one game, not the two as expected.


The manual page states:

-eECO_file Perform ECO classification of games. The optional
ECO_file should contain a PGN format list of ECO lines.
Default is to use /usr/share/pgn-extract/eco.pgn as ECO_file.


I must admit I did not think it was supposed to be in
/usr/share/pgn-extract/, bit defaulted to the current directory. Was
that something you compiled in ??

It certainly looks in the current directory and complains if its not
present. But I assumed one could specify an argument to the -e option.

I must admit, after find 'scid'

http://scid.sourceforge.net/

- a graphical UNIX pgn database manager, I'm probably less likely to
want to use pgn-extract.

i.e. the other files should have no games but the ECO list in PGN.


So are you saying the game files, dronai.pgn & drkirkby-Perpersa.pgn
should not have complete games, but just ECO lists ???

Matching the only one game may happen because dronai.pgn is handles as
a ECO lines list.


Could you please show what you have in your files?


Sure.

% cat dronai.pgn

[Event "ICC 45 0"]
[Site "Internet Chess Club"]
[Date "2003.12.26"]
[Round "-"]
[White "g8wrb"]
[Black "dronai"]
[Result "0-1"]
[ICCResult "White resigns"]
[WhiteElo "1482"]
[BlackElo "1580"]
[Opening "Queen's pawn: Chigorin variation"]
[ECO "D00"]
[NIC "QP.08"]
[Time "11:58:10"]
[TimeControl "2700+0"]

1. d4 d5 2. Nc3 Nf6 3. Nf3 e6 4. Bf4 a6 5. e3 c5 6. Bd3 h6 7. O-O Nh5
8. Ne5
Nxf4 9. exf4 cxd4 10. Ne2 Bc5 11. a3 Nd7 12. b4 Bd6 13. Nxd7 Bxd7 14.
c4 b6
15. cxd5 exd5 16. Qd2 Qf6 17. Rac1 O-O 18. Bc2 Rfe8 19. Rfe1 Rac8 20.
Bb1
Bb5 21. Nxd4 Bxf4 22. Rxc8 Rxc8 23. Qb2 Be5 24. Qd2 Bxd4 25. Qc2 Rxc2
{White resigns}
0-1

sparrow /export/home/davek % cat drkirkby-Perpersa.pgn
[Event "ICS rated standard match"]
[Site "64.71.131.140"]
[Date "2003.12.21"]
[Round "-"]
[White "drkirkby"]
[Black "Perpersa"]
[Result "0-1"]
[WhiteElo "1051"]
[BlackElo "1511"]
[TimeControl "2700+30"]

1. d4 d6 2. e4 Nd7 3. Nc3 Ngf6 4. Nf3 g6 5. Bf4 Bg7 6. Bg5 O-O 7. Bc4
Re8
8. O-O e5 9. d5 Nf8 10. Bb5 Re7 11. Nh4 a6 12. Bc4 b5 13. Be2 h5 14.
b4
N8h7 15. Qd2 Nxg5 16. Qxg5 Nh7 17. Qg3 Bh6 18. Nxg6 fxg6 19. Qxg6+ Bg7
20.
Bxh5 Nf8 21. Qg3 Kh7 22. Rae1 Bh6 23. Rd1 Rg7 24. Qd3 Qg5 25. Qf3 Ng6
26.
Ne2 Nh4 27. Ng3 Nxf3+ 28. Bxf3 Bg4 29. Bxg4 Qxg4 30. Rd3 Rag8 31. Re1
Bf4
32. h3 Qg6 33. Rf3 Bxg3 34. Rxg3 Qh6 35. Ree3 Rxg3 36. Rxg3 Rxg3 37.
fxg3
Qe3+ 38. Kh2 Qxe4 39. Kg1 Qe1+ 40. Kh2 Qxb4 41. g4 Qb2 42. Kg3 Qxc2
43. Kh4
Qxa2 44. g3 Qxd5 45. Kh5 e4+ 46. g5 Qd1+ 47. g4 Kg7 48. h4 Qc1 49. g6
Qh6#
{drkirkby checkmated} 0-1

sparrow /export/home/davek % head -40 eco.PGN
{
A PGN file of ECO classifications distributed with the PGN extraction
program, extract. I believe that the original file from which I
generated this was put together by Ewart Shaw, Franz Hemmer and
others,
to whom appropriate thanks and acknowledgement is due. Permission has
been granted for its inclusion with the extract program, which is
available from caissa.onenet.net and ftp.pitt.edu.

David Barnes )
http://www.cs.ukc.ac.uk/people/staff/djb/
}

[ECO "A00"]
[Opening "Polish (Sokolsky) opening"]

1. b4 *

[ECO "A00"]
[Opening "Polish"]
[Variation "Tuebingen variation"]

1. b4 Nh6 *

[ECO "A00"]
[Opening "Polish"]
[Variation "Outflank variation"]

1. b4 c6 *

[ECO "A00"]
[Opening "Benko's opening"]

1. g3 *

[ECO "A00"]
[Opening "Lasker simul special"]

1. g3 h5 *

[ECO "A00"]

Dr. David Kirkby
  #4   Report Post  
Old December 31st 03, 08:42 PM
Ari Makela
 
Posts: n/a
Default pgn-extract

In article , Dr. David Kirkby wrote:

I must admit I did not think it was supposed to be in
/usr/share/pgn-extract/, bit defaulted to the current directory. Was
that something you compiled in ??


I use pgn-extract from the Debian package. FHS naturally requires some
changes to most software.

It certainly looks in the current directory and complains if its not
present. But I assumed one could specify an argument to the -e option.


Yes, but with some programs there must be a space after a switch and
sometimes the space can be an error :/ The thirty years of add on tools
is one of the strengths of unix but it's also a weakness.

- a graphical UNIX pgn database manager, I'm probably less likely to
want to use pgn-extract.


IMO they compliment each other and Scid is one of the very many
programs which produce incorrect PGN where there's no space after period
of the move number i.e. "1.e4" instead "1. e4". Yes, the text of the
standard is somewhat obscure but there's an example where there are
spaces.

pgn-extract does this correctly.

So are you saying the game files, dronai.pgn & drkirkby-Perpersa.pgn
should not have complete games, but just ECO lists ???


Not necessarily. It might be some issue with the command line argument
handling of pgn-extract. At the moment I don't have the time to look at
your data but I'll mark your article as unread and try to find the time
to look at it tomorrow.

--
Ari Makela no escaping it -
I must step on fallen leaves
http://arska.org/hauva/ to take this path (Suzuki Majoko)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017