X-Git-Url: https://code.communitydata.science/covid19.git/blobdiff_plain/4fe5deb013a899e1410fbdbb957149c5d6f65440..1cec120dfab8768c3ade5b0bfa6e81e19e3d833c:/cron-wikipedia_views.sh?ds=sidebyside diff --git a/cron-wikipedia_views.sh b/cron-wikipedia_views.sh index 3611657..4afe380 100644 --- a/cron-wikipedia_views.sh +++ b/cron-wikipedia_views.sh @@ -1,13 +1,13 @@ #!/bin/bash -x TZ="UTC" -date_string=$(date +%Y%m%d) +date_string=${OVERRIDE_DATE_STRING:-$(date +%Y%m%d)} -./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/enwp-wikiproject_scraper-${date_string}.log) +view_log="enwp-daily_views-${date_string}.log" +./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/${view_log}) # get the list of files -view_log="enwp-daily_views-${date_string}.log" -./wikipedia/scripts/fetch_enwiki_daily_views.py 2> >(tee wikipedia/logs/${view_log}) +./wikipedia/scripts/fetch_enwiki_daily_views.py -d "${date_string}" 2> >(tee -a wikipedia/logs/${view_log}) mv wikipedia/logs/${view_log} /var/www/covid19/wikipedia/logs/${view_log} mv wikipedia/data/digobs_covid19-wikipedia-enwiki_dailyviews-${date_string}.tsv /var/www/covid19/wikipedia/