Now slightly out-of-date version of what is in Makefile. Template: + Input file containing games with - Input file(s): - Resulting output ... - Expected output: ... - Command: pgn-extract No flags: + No input file. - Input file(s): N/A - Example input: f3 e5 g4 Qh4 0-1 - Resulting output should be that the game input on standard input is formatted as PGN on standard output. - Expected output: Contents of fools-mate.pgn on standard output. - Command: pgn-extract < fools-mate.txt + Single input file - Input file(s): fools-mate.txt - Resulting output should be the input formatted as PGN on standard output. - Expected output: Contents of fools-mate.pgn should appear on standard output. - Command: pgn-extract fools-mate.txt -7 / --seven + Input file with games having tags additional to the seven tag roster. - Input file(s): test-7.pgn - Game output should have only the tags of the seven tag roster. - Expected output: test-7-out.pgn - Command: pgn-extract -7 -otest-7-out.pgn test-7.pgn -a / --append + Input file containing games in any accepted format. - Input file(s): test-a.txt - Resulting output should contain two versions of the input game formatted in PGN. The --output command is run first to create a new file, then the -a version to append to that file. - Expected output: test-a-out.pgn - Command: pgn-extract --output test-a-out.pgn test-a.txt pgn-extract -atest-a-out.pgn test-a.txt - Command: pgn-extract --output test-a-out.pgn test-a.txt pgn-extract --append test-a-out.pgn test-a.txt -A + Input file containing games and a file of arguments. - Input file(s): fischer.pgn, petrosian.pgn, arglist.txt - Resulting output should be files separating the unique and duplicated games in the input files. - Expected output: test-A-unique.pgn, test-A-dupes.pgn - Command: pgn-extract -Aargslist.txt -b + Input file containing games of different length. - Input file(s): fischer.pgn - Resulting output: games whose number of moves is within the specified bounds. - Expected output: 45 moves or more: fischer-bl45-out.pgn - Command: pgn-extract -bl45 -ofischer-bl45-out.pgn fischer.pgn - Expected output: 45 moves or less: fischer-bu45-out.pgn - Command: pgn-extract -bu45 -ofischer-bu45-out.pgn fischer.pgn - Expected output: exactly 30 moves: fischer-b30-out.pgn - Command: pgn-extract -b30 -ofischer-b30-out.pgn fischer.pgn -c / --checkfile + Input files containing games. - Input file(s): fischer.pgn, petrosian.pgn - Resulting output should contain matched games that do not already occur in the check file. - Expected output: test-c-out.pgn - Command: pgn-extract -cpetrosian.pgn -D -TpPetrosian -otest-c-out.pgn fischer.pgn - Command: pgn-extract -cclist.txt -D -TpPetrosian -otest-c-out.pgn fischer.pgn -C / --nocomments + Input file containing games with comments - Input file(s): test-C.pgn - Resulting output should have all comments removed. - Expected output: test-C-out.pgn - Command: pgn-extract -C -otest-C-out.pgn test-C.pgn -d / --duplicates + Input file containing games with duplicates and non-duplicates. - Input file(s): fischer.pgn, petrosian.pgn - Resulting output should be files separating the unique and duplicated games in the input files. - Expected output: test-d-unique.pgn, test-d-dupes.pgn - Command: pgn-extract -dtest-d-dupes.pgn -otest-d-unique.pgn fischer.pgn petrosian.pgn -D / --noduplicates + Input file containing games with duplicates and non-duplicates. - Input file(s): fischer.pgn, petrosian.pgn - Resulting output should be a file containing the combined input with duplicate games removed. - Expected output: test-D-unique.pgn - Command: pgn-extract -D -otest-D-unique.pgn fischer.pgn petrosian.pgn - Command: pgn-extract --noduplicates -otest-D-unique.pgn fischer.pgn petrosian.pgn -e + Input file containing games without ECO classifications. - Input file(s): test-e.pgn and eco.pgn in the test folder. - Resulting output should have ECO classification added to the tags. - Expected output: test-e-out.pgn - Command: pgn-extract -e -otest-e-out.pgn test-e.pgn - Command: pgn-extract -eeco.pgn -otest-e-out.pgn test-e.pgn -E + Input file containing games. - Input file(s): test-E.pgn and eco.pgn if -e flag is used. - Resulting output should be separate files for each ECO classification at the level of the initial letter (A-E). - Expected output: A.pgn, B.pgn, E.pgn - Command: pgn-extract -e -E1 test-E.pgn -f + Input files containing games. - Input file(s): test-f1.pgn, test-f2.pgn, files.txt - Resulting output should be the combination of the input files. - Expected output: test-f-out.pgn - Command: pgn-extract -ffiles.txt -otest-f-out.pgn -F: + Input file containing games without a trailing FEN comment. - Input file(s): test-F.pgn - Resulting output should have a comment at the end containing the FEN description of the final position. - Expected output: test-F-out.pgn - Command: pgn-extract -F -otest-F-out.pgn test-F.pgn -h / -? / --help + No input required. - Input file(s): N/A - Resulting output should be a description of how to use pgn-extract - Expected output: N/A - Command: pgn-extract -h - Command: pgn-extract -? - Command: pgn-extract --help -l + Input file containing games. - Input file(s): fischer.pgn - Resulting output: List of games parsed written to log.txt - Expected output: log.txt - Command: pgn-extract -llog.txt -otest-l-out.pgn fischer.pgn -L + Input file containing games. - Input file(s): test-L1.pgn, test-L2.pgn - Resulting output should be that log.txt contains the combined logs from two runs of pgn-extract. - Expected output: log.txt - Command: pgn-extract -llog.txt -r test-L1.pgn pgn-extract -Llog.txt -r test-L2.pgn -M / --checkmate + Input file containing games. - Input file(s): test-checkmate.pgn - Resulting output should contain only those games that end in checkmate. - Expected output: test-checkmate-out.pgn - Command: pgn-extract --checkmate -otest-checkmate-out.pgn test-checkmate.pgn -n + Input file containing games. - Input file(s): petrosian.pgn - Resulting output should be separate files containing matched and non-matched games. - Expected output: test-n-matched.pgn, test-n-unmatched.pgn - Command: pgn-extract -TpFischer -otest-n-matched.pgn -ntest-n-unmatched.pgn petrosian.pgn -N / --nonags + Input file containing games with NAGs. - Input file(s): test-N.pgn - Resulting output should have all NAGs removed. - Expected output: test-N-out.pgn - Command: pgn-extract -N -otest-N-out.pgn test-N.pgn -o / --output + Input file containing games in any accepted format. - Input file(s): test-o.txt - Resulting output should contain the input game formatted in PGN. - Expected output: test-o-out.pgn - Command: pgn-extract -otest-o-out.pgn test-o.txt - Command: pgn-extract --output test-o-out.pgn test-o.txt -P + Input file containing games with different sequences for the same opening. - Input file(s): test-P.pgn, Pvars.txt - Resulting output should be games whose opening move exactly match the sequence specified in Pvars.txt - Expected output: test-P-out.pgn - Command: pgn-extract -P -vPvars.txt -otest-P-out.pgn test-P.pgn -r + Input file containing games in any accepted format. - Input file(s): test-r.text - Resulting output should contain tag summary lines for the games matched and a report of any errors. - Expected output: test-r-log.text - Command: pgn-extract -r -Ltest-r-log.txt test-r.txt -R + Input file containing games. - Input file(s): test-R.pgn, roster.txt - Resulting output should contain games with their tag roster in the order specified in roster.txt - Expected output: test-R-out.pgn - Command: pgn-extract -Rroster.txt --output test-R-out.pgn test-R.pgn -s + Input file containing games. - Input file(s): test-s.pgn - Resulting output should be silent, with games written to the output file. - Expected output: test-s-out.pgn - Command: pgn-extract -s -o test-s-out.pgn test-s.pgn -S + Input file containing games whose players' names have slight sound variations from anglesized versions. - Input file(s): test-S.pgn - Resulting output should be games that match by ignoring slight soundex differences. - Expected output: test-S-out.pgn - Command: pgn-extract -S -TpPetrosian -otest-S-out.pgn test-S.pgn -t + Input file containing games and a file of tag criteria. - Input file(s): test-t.pgn, taglist.txt - Resulting output should be only those games whose tags match all of the criteria. - Expected output: test-t-out.pgn - Command: pgn-extract -ttaglist.txt -otest-t-out.pgn test-t.pgn -T + Input file containing games with tag information. - Input file(s): fischer.pgn, test-Ta.pgn (and eco.pgn for -Te test.) - Resulting output should contain only those games whose tag information matches that specified. - Expected output: test-Ta-out.pgn, test-Tb-out.pgn, test-Td-out.pgn, test-Te-out.pgn, test-Tp-out.pgn, test-Tw-out.pgn - Command: pgn-extract -Td1970 -otest-Td-out.pgn fischer.pgn - Command: pgn-extract -TbPetrosian -otest-Tb-out.pgn fischer.pgn - Command: pgn-extract -e -TeB14 -otest-Te-out.pgn fischer.pgn - Command: pgn-extract -TpPetrosian -otest-Tp-out.pgn fischer.pgn - Command: pgn-extract -Tr0-1 -otest-Tr-out.pgn fischer.pgn - Command: pgn-extract -TwFischer -otest-Tw-out.pgn fischer.pgn - Command: pgn-extract -TaBarnes -otest-Ta-out.pgn test-Ta.pgn -U / --nounique + Input file containing games with duplicates and non-duplicates. - Input file(s): fischer.pgn, petrosian.pgn - Resulting output should be a file containing just the duplicate games. - Expected output: test-U-unique.pgn - Command: pgn-extract -U -otest-U-unique.pgn fischer.pgn petrosian.pgn - Command: pgn-extract --nounique -otest-U-unique.pgn fischer.pgn petrosian.pgn -v + Input file containing games. - Input file(s): najdorf.pgn, vvars.txt - Resulting output should be only those games whose opening moves textually match (in any order) the moves in vars.txt. - Expected output: test-v-out.pgn - Command: pgn-extract -vvvars.txt -otest-v-out.pgn najdorf.pgn -V + Input file containing games with variations - Input file(s): test-V.pgn - Resulting output should have all variations removed. - Expected output: test-V-out.pgn - Command: pgn-extract -V -otest-V-out.pgn test-V.pgn -w / --linelength + Input file containing games. - Input file(s): test-w.pgn - Resulting output Games formatted up to the specified line length. The default is 75. - Expected output: test-w60-out.pgn, test-w75-out.pgn, test-w1000-out.pgn - Command: pgn-extract -w60 -otest-w60-out.pgn test-w.pgn - Command: pgn-extract -w75 -otest-w75-out.pgn test-w.pgn - Command: pgn-extract -w1000 -otest-w1000-out.pgn test-w.pgn - Command: pgn-extract --linelength 60 -otest-w60-out.pgn test-w.pgn - Command: pgn-extract --linelength 75 -otest-w75-out.pgn test-w.pgn - Command: pgn-extract --linelength 1000 -otest-w1000-out.pgn test-w.pgn -W + Input file containing games. - Input file(s): test-W.pgn - Resulting output should be games formatted in the specified notation: halg (hyphenated long algebraic), lalg (non-hyphenated long algebraic), elalg (enhanced long algebraic), and alternative piece letters. - Expected output: test-Whalg-out.pgn, test-Wlalg-out.pgn, test-elalg-out.pgn, test-Wdeutsch-out.pgn - Command: pgn-extract -Whalg -otest-Whalg-out.pgn test-W.pgn - Command: pgn-extract -Wlalg -otest-Wlalg-out.pgn test-W.pgn - Command: pgn-extract -Welalg -otest-Welalg-out.pgn test-W.pgn - Command: pgn-extract -WsanBSLTDK -otest-Wdeutsch-out.pgn test-W.pgn -x + Input file containing games. - Input file(s): najdorf.pgn, xvars.txt - Resulting output should be only those games which match the result of reaching the opening sequence in vars.txt. - Expected output: test-x-out.pgn - Command: pgn-extract -xxvars.txt -otest-x-out.pgn najdorf.pgn -Z + Input file containing games with duplicates and non-duplicates. - Input file(s): fischer.pgn, petrosian.pgn - Resulting output should be files separating the unique and duplicated games in the input files. - Expected output: test-Z-unique.pgn, test-Z-dupes.pgn - Command: pgn-extract -Z -dtest-Z-dupes.pgn -otest-Z-unique.pgn fischer.pgn petrosian.pgn -z + Input file containing games. - Input file(s): petrosian.pgn, zmatch.txt - Resulting output should be games whose material balance matches that specified in zmatch.txt - Expected output: test-z-out.pgn - Command: pgn-extract -zzmatch.txt -otest-z-out.pgn petrosian.pgn -# + Input file containing games. - Input file(s): test-hash.pgn - Resulting output The input file split in to separate sub-files, each containing 10 games, except the last which may contain fewer. - Expected output: 1.pgn, 2.pgn - Command: pgn-extract -#20 test-hash.pgn --evaluation + Input file containing games. - Input file(s): test-evaluation.pgn - Resulting output should include an evaluation value in a comment after every move. - Expected output: test-evaluation-out.pgn - Command: pgn-extract --evaluation -otest-evaluation-out.pgn test-evaluation.pgn --fencomments + Input file containing games. - Input file(s): test-fencomments.pgn - Resulting output should have a comment after every move containing a FEN description of the position after that move. - Expected output: test-fencomments-out.pgn - Command: pgn-extract --fencomments -otest-fencomments-out.pgn test-fencomments.pgn --markmatches + Input file containing games. - Input file(s): najdorf.pgn, xvars.txt - Resulting output should be only those games which match the result of reaching the opening sequence in vars.txt. The point of each match is marked with the comment { MATCH } - Expected output: test-markmatches-out.pgn - Command: pgn-extract --markmatches MATCH -xxvars.txt -otest-markmatches-out.pgn najdorf.pgn --nochecks + Input file containing games with moves involving moves that give check and/or mate. - Input file(s): test-nochecks.pgn - Resulting output should contain games with no check indicators after moves. - Expected output: test-nochecks-out.pgn - Command: pgn-extract --nochecks -otest-nochecks-out.pgn test-nochecks.pgn --nomovenumbers + Input file containing games with move numbers. - Input file(s): test-nomovenumbers.pgn - Resulting output should contain games with no move numbers. - Expected output: test-nomovenumbers-out.pgn - Command: pgn-extract -otest-no-movenumbers-out.pgn --nomovenumbers test-nomovenumbers.pgn --noresults + Input file containing games with results. - Input file(s): test-noresults.pgn - Resulting output should contain games with no results. - Expected output: test-noresults-out.pgn - Command: pgn-extract -otest-no-results-out.pgn --noresults test-noresults.pgn --notags + Input file containing games with tag information. - Input file(s): test-notags.pgn - Resulting output should contain games with no tag information. - Expected output: test-notags-out.pgn - Command: pgn-extract -otest-no-tags-out.pgn --notags test-notags.pgn --plylimit + Input file containing games. - Input file(s): test-plylimit.pgn - Resulting output should contain games whose number of moves (plies) are limited at the specified ply limit. - Expected output: test-plylimit-out.pgn - Command: pgn-extract --plylimit 10 -otest-plylimit-out.pgn test-plylimit.pgn --stalemate + Input file containing games. - Input file(s): test-stalemate.pgn - Resulting output should contain only those games that end in stalemate. - Expected output: test-stalemate-out.pgn - Command: pgn-extract --stalemate -otest-stalemate-out.pgn test-stalemate.pgn