Initial check for pgnmentor.com downloader

This commit is contained in:
2023-07-19 22:42:42 +09:00
commit 4ad609c759
12 changed files with 1523 additions and 0 deletions

33
bin/pgnmentor_download.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# download/get files.html
# find (Events|Players|Openings updated): Month YYYY
# => store in last update
# => if one changed -> process
# in files.html
# div "Players"
# => table below
# => folder "players/"
# div "Openings"
# h2 "Modern Queen Pawn", "Classical Queen Pawn", "Modern King Pawn", "Classical King Pawn", "Flank and Unorthodox"
# => table below each h2
# => folder "openings/"
# div "Events"
# h2 "Tournaments", "Candidates and Interzonals", "World Championships"
function error() {
if [ -t 1 ]; then echo "$1"; fi; exit 1;
}
# has to be YYYYMMDD
current_date="${1}";
if [ -z "${current_date}" ] || ! [[ "${current_date}" =~ ^[0-9]{8}$ ]]; then
error "Current date must be set and in the format YYYYMMDD";
fi;
# __END__