34 lines
764 B
Bash
Executable File
34 lines
764 B
Bash
Executable File
#!/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__
|