Author: David Dahlem
Date: 11:07:55 09/26/05
Go up one level in this thread
On September 26, 2005 at 07:53:30, Igor Gorelikov wrote: >First you need to run sed with the following command (it can be done with a >batch file) to joint each pair of lines and add asterisk for results: > >sed "$!N;s/\n/ /;s/$/\n*\n/" book.txt > temp.pgn > >Then run PGN-extract to obtain a pgn file: > >pgn-extract -obook.pgn temp.pgn > >That's all. Now you get book.pgn. > >Regards, >Igor After reading some docs for sed, i put sed and pgn-extract in the same folder, and this batch file will convert from book.txt to book.pgn in one step, with ECO classification ... sed "G" book.txt > dbl_space.txt sed "$!N;s/\n/ /;s/$/\n*\n/" dbl_space.txt > temp.pgn pgn-extract -e -obook.pgn temp.pgn Works great, thanks for your help. Regards Dave
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.