X-Git-Url: https://code.communitydata.science/covid19.git/blobdiff_plain/141871eda6754b95f1617e354fe1d9728d0fd8e1..refs/remotes/gh-cdsc/master:/cron-wikipedia_revisions.sh?ds=sidebyside diff --git a/cron-wikipedia_revisions.sh b/cron-wikipedia_revisions.sh old mode 100644 new mode 100755 index 71ee752..f836c47 --- a/cron-wikipedia_revisions.sh +++ b/cron-wikipedia_revisions.sh @@ -1,17 +1,21 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + TZ="UTC" date_string=$(date +%Y%m%d) -./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/enwp-wikiproject_scraper-${date_string}.log) - revs_log="enwp-revisions-${date_string}.log" -./wikipedia/scripts/fetch_enwiki_revisions.py 2> >(tee wikipedia/logs/${rev_log}) -cp wikipedia/logs/${rev_log} /var/www/covid19/wikipedia/logs/ +./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/${revs_log}) + +./wikipedia/scripts/fetch_enwiki_revisions.py 2> >(tee -a wikipedia/logs/${revs_log}) +mv wikipedia/logs/${revs_log} /var/www/covid19/wikipedia/logs/ revs_tsv="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.tsv" -cp wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia +mv wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia revs_json="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.json" xz wikipedia/data/${revs_json} -cp wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia +mv wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia +