nguyenpham / ocgdb

Open Chess Game Database Standard (OCGDB)
MIT License
31 stars 8 forks source link

How to remove duplicates from pgn? #18

Closed Jonathan003 closed 2 years ago

Jonathan003 commented 2 years ago

I haver made a small example pgn databases with 60 games '60_games_with_doubles.pgn' I know about half of the games are duplicates, because I have searched the database for duplicates with Chessbase.

I don't get it to work to create a new pgn database with the duplicates removed with ocgdb, and I have no idea what I do wrong?

I typed these commands one after the other

ocgdb -pgn 60_games_with_doubles.pgn -db 60_games_with_doubles.db3 -cpu 4 -o moves ocgdb -db 60_games_with_doubles.db3 -cpu 4 -dup o printall;remove ocgdb -pgn 60_games_with_doubles_out.pgn -db 60_games_with_doubles.db3 -cpu 4 -export

This is the smal example pgn databases with duplicates I used: https://drive.google.com/file/d/1y56C8ExBaHpOtQW4jtvbHR4t5LcATtf_/view?usp=sharing

I made a video capture of it:

https://user-images.githubusercontent.com/40061628/153944314-0b97a68c-b80a-493f-9764-0e6f431610de.mp4

nguyenpham commented 2 years ago

Your commands are good, except missing the minus symbol for option (-o, not o):

ocgdb -db 60_games_with_doubles.db3 -cpu 4 -dup -o printall;remove

Jonathan003 commented 2 years ago

Thanks it works now!

I used this as example https://github.com/nguyenpham/ocgdb#:~:text=ocgdb%20%2Ddb%20c%3A%5Cdb%5Cbig.ocgdb.db3%20%2Dcpu%204%20%2Ddup%20o%20printall%3Bremove

Apparently the link to the selected text only works if you open the link in a new tablet on Google Chrome. This is the text I'm referring to ocgdb -db c:\db\big.ocgdb.db3 -cpu 4 -dup o printall;remove

That's why I made the mistake. These examples also uses the extension .png instead of .pgn for pgn files. I think these are typos because of spell checkers. Top