X-Git-Url: https://code.communitydata.science/covid19.git/blobdiff_plain/17c3f75389d7cadba4400ee5a0d2281f71fcdc4c..refs/remotes/gh-cdsc/master:/cron-wikipedia_views.sh?ds=sidebyside diff --git a/cron-wikipedia_views.sh b/cron-wikipedia_views.sh old mode 100644 new mode 100755 index 3611657..bb2f621 --- a/cron-wikipedia_views.sh +++ b/cron-wikipedia_views.sh @@ -1,13 +1,16 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + 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/