File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99debug () {
1010 # Comment out the following line to print debug information
11- # echo "$@" 1>&2;
11+ # echo "$@" 1>&2
1212 echo -n ' '
1313}
1414
@@ -112,23 +112,11 @@ check_all_files_ready() {
112112 return $ANY_FILE_MISSING
113113}
114114
115+ # Find dates in directory names. We need to parse HTML.
115116#
116- # Usually you might try to get a list of dates from
117- # https://wikidata.aerotechnet.com/enwiki/ and then sort them, then look at status.html
118- # inside the directories.
119- #
120- # We want to avoid parsing HTML.
121- #
122- # Previous version of this script then looked at index.json
123- # (https://wikidata.aerotechnet.com/index.json) but the file is written at beginning
124- # of the export so first of month it would list files that don't exist yet.
125- #
126-
127- for MINUS_NUM_MONTHS in 0 1 2 3; do
128- set_date_to_first_of_month $MINUS_NUM_MONTHS
117+ CONTENT=$( curl -s -S --fail ' https://wikidata.aerotechnet.com/enwiki/' )
118+ for DATE in $( echo $CONTENT | grep -oE ' 20[0-9]{6}' | sort -nr) ; do
129119 check_all_files_ready $DATE
130- # echo $?
131- # echo $RES
132120
133121 if [ $? == 0 ]; then
134122 echo " $DATE "
You can’t perform that action at this time.
0 commit comments