disort.sh
Disort.sh is a utility which sorts the problems downloaded from goproblems.com into directories based on the content of the DI (difficulty) tag. It is therefore more accurate than using goproblemscom2gquiz.sh, although it does not sort by genre.
The reccomended way to use disort.sh is to use goproblemscom2gquiz.sh first, and then run disort.sh within the genre directories. You can then re-organize the problems by exact strength.
disort.sh is included below:
# disort.sh by Oliver Richman on August 29th 2006. # Works in bash (and cygwin for windows too!) # Sorts .SGF files into directories based on the contents of the DI tag. # ex. If the file contains DI\[5k\] then it is moved into .\5k # Please do not redistribute modified versions of this file. #
for fname in `ls -1 *.sgf` do
echo Processing $fname grep "DI\[" $fname > tmp sed 's/^.*DI\[//' tmp > tmp2 sed 's/].*$//' tmp2 > tmp3 mkdir `cat tmp3` 2>/dev/null mv $fname `cat tmp3`
done
For windows users there is a script at SortProblemsByRank.