]> git.sesse.net Git - remoteglot-book/blobdiff - parallel-parse-pgn.sh
Use the new pgn-extract partitioning to get the file offsets right.
[remoteglot-book] / parallel-parse-pgn.sh
index 79fa44069c78c10874d1d854687773da646e8044..cfb61bcc6305fffee6efe016a9e61c92013f97d7 100755 (executable)
@@ -1,6 +1,10 @@
 #! /bin/sh
 FILE=$1
 for X in $( seq 0 39 ); do
-       ( ./parse-pgn.pl $FILE $X 40 >> part-$X.bin ) &
+       (
+               START=$( ./find-pgn-split-point.sh "$FILE" $X 40 )
+               END=$( ./find-pgn-split-point.sh "$FILE" $(( X + 1 )) 40 )
+               ~/nmu/pgn-extract/pgn-extract --startpos $START --endpos $END -e -Wsessebin "$FILE" >> part-$X.bin 2>/dev/null
+       ) &
 done
 wait