Hi Ferdy
I have another suggestion for the tool.
Is it possible to output the player ratings as well? Perhaps it is safer to output all the pgn fields that are in the input file.
Thanks.
John
Tool to extract parts of games from pgn file
Moderators: hgm, Rebel, chrisw
-
- Posts: 215
- Joined: Sun Feb 24, 2008 2:08 am
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tool to extract parts of games from pgn file
I will do that.JohnS wrote:Hi Ferdy
I have another suggestion for the tool.
Is it possible to output the player ratings as well? Perhaps it is safer to output all the pgn fields that are in the input file.
Thanks.
John
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tool to extract parts of games from pgn file
Source was revised, but have not released yet the exe.JohnS wrote:Hi Ferdy
I have another suggestion for the tool.
Is it possible to output the player ratings as well? Perhaps it is safer to output all the pgn fields that are in the input file.
Thanks.
John
https://github.com/fsmosca/GameFragmentExtractor
If you have python and python-chess installed you can try it.
gfe.py -i <your input pgn file> -o <your output pgn file>
It works on my test.
-
- Posts: 215
- Joined: Sun Feb 24, 2008 2:08 am
Re: Tool to extract parts of games from pgn file
Thanks for the update Ferdy. I will test it when you upload the exe file since I don't have the support programs required.
John
John
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tool to extract parts of games from pgn file
Released 1.1JohnS wrote:Thanks for the update Ferdy. I will test it when you upload the exe file since I don't have the support programs required.
John
https://github.com/fsmosca/GameFragment ... r/releases
-
- Posts: 215
- Joined: Sun Feb 24, 2008 2:08 am
Re: Tool to extract parts of games from pgn file
Ferdy
Many thanks for the new version. It works great.
All the best.
John
Many thanks for the new version. It works great.
All the best.
John
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tool to extract parts of games from pgn file
I am glad that it worked, since this is my first time handling the variations using python-chess modules .JohnS wrote:Ferdy
Many thanks for the new version. It works great.
All the best.
John
-
- Posts: 215
- Joined: Sun Feb 24, 2008 2:08 am
Re: Tool to extract parts of games from pgn file
Hi Ferdy
The following games cause problems and the tool doesn't work.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 {[#] a blunder} 3. Qh5# 1-0
This one has a text comment as well as the diagram symbol.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 3. Qh5# {[#]} 1-0
Here the diagram is at the end of the game.
Is it possible for the tool to deal with these cases?
Many thanks.
John
The following games cause problems and the tool doesn't work.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 {[#] a blunder} 3. Qh5# 1-0
This one has a text comment as well as the diagram symbol.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 3. Qh5# {[#]} 1-0
Here the diagram is at the end of the game.
Is it possible for the tool to deal with these cases?
Many thanks.
John
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tool to extract parts of games from pgn file
The first one is possible, but not sure about the second because that was already an end position, it would produce 2 same position, is it really needed?JohnS wrote:Hi Ferdy
The following games cause problems and the tool doesn't work.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 {[#] a blunder} 3. Qh5# 1-0
This one has a text comment as well as the diagram symbol.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 g5 2. d4 f6 3. Qh5# {[#]} 1-0
Here the diagram is at the end of the game.
Is it possible for the tool to deal with these cases?
Many thanks.
John
-
- Posts: 215
- Joined: Sun Feb 24, 2008 2:08 am
Re: Tool to extract parts of games from pgn file
Hi Ferdy
Sorry, my second example is poor because the game ends in mate. Here's a better but still silly example.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 f6 2. d4 h6 3. Qh5+ {[#]} 1-0
So here the idea is to analyse from the last move to find out why Black resigned.
I hope this example is clearer.
Thanks.
John
Sorry, my second example is poor because the game ends in mate. Here's a better but still silly example.
[Event "?"]
[Site "?"]
[Date "2017.05.01"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "1-0"]
[ECO "B00"]
[PlyCount "5"]
[SourceDate "2017.05.01"]
[SourceVersionDate "2017.05.01"]
1. e4 f6 2. d4 h6 3. Qh5+ {[#]} 1-0
So here the idea is to analyse from the last move to find out why Black resigned.
I hope this example is clearer.
Thanks.
John