Jonathan003 wrote on 10/25/20 at 13:29:10:
I want to try this.
I admire your sense of adventure.
Jonathan003 wrote on 10/25/20 at 13:29:10:
I have a windows 10 64 bit system.
Can you tell me how exactly to do it please maybe with some screenshots or video capture?
I do detailed steps with screenshots for users at work, but then I am paid for it. Since you installed pgn-extract on Windows already, I know for a fact you can do the rest of the steps.
Jonathan003 wrote on 10/25/20 at 13:29:10:
I try to follow these steps:
$ pgn-extract -w200 --fencomments -orepertoire1.pgn repertoire.pgn
$ gawk -f fencomments.awk repertoire1.pgn > repertoire1.epd
$ pgn-extract -w200 --fencomments -onew1.pgn new.pgn
$ gawk -f fencomments.awk new1.pgn > new1.epd
$ gawk -f epdcompare.awk -v CMP=repertoire1.epd new1.epd > cmp.epd
I have pgn-extract but I have no idea what's gawk?
You give this link for windows users to this website: gnuwin32.sourceforge.net/packages
What am I supposed to download there and how to use it?
Gawk is GNU awk. Awk is a pattern-matching language for dealing with text files, similar to grep and sed but more suitable for scripting. To be honest most people these days would prefer python or php or even perl. I use awk at work (for getting work done!) because they can stop me from installing the p's, but they can't stop me from installing gawk.
Gawk and pgn-extract are both command-line programs which you use by entering commands in a command interpreter -- cmd.exe on Windows. The command-line is very practical for text processing, but it's not visual like a GUI. It's more like walking around your house with a blindfold on, and you only navigate successfully because you already know where everything is.
- http://gnuwin32.sourceforge.net/packages
- Click on the "Gawk" link.
- Click on the "General Installation Instructions" link, which also includes usage instructions, and read up.
- Go back to the Gawk page.
- Probably you want the "Complete package, except sources" Setup option.
- Click on that to download the setup.exe.
- Ideally you would verify the download with the provided md5sum, but I'm not going to describe how to do that.
- Finally, follow the previous General Installation Instructions to install.
There is a big caveat to all of the above gawk installation steps. I have gawk working on a couple of Windows 10 machines, but I didn't use the setup method (it's exactly this that is blocked at my work), so I'm not really sure if it will succeed. The setup.exe on sourceforge was created for Windows Vista, and might not work on Windows 10. Or it might partially succeed but require tweaks after.
Anyway, fingers crossed, after installation open cmd.exe and type `gawk --version` (without the quotes), to verify that you can run it. With pgn-extract the command is `pgn-extract --version`.
Jonathan003 wrote on 10/25/20 at 13:29:10:
Maybe I can install a Unix system in Virtual Box on my Windows 64bit PC?
I hope you can help me with this.
Yes, that's another way, assuming Unix means a Linux distribution. But it's another can of worms. Your Linux will come with awk but not with pgn-extract. To install pgn-extract via the package manager means you need to connect the VM to the network, which is not a trivial step. The other option is to build pgn-extract from source, which is even more fun.
Edited: Another option for you is Windows Subsystem for Linux (WSL). I knew about this but I didn't realise it's available on the Windows Store. Easy-peasy. Choose the Ubuntu version and install pgn-extract from Synaptic, and you will be good to go.