]> code.communitydata.science - covid19.git/blobdiff - cron-wikipedia_revisions.sh
Merge pull request #20 from makoshark/master
[covid19.git] / cron-wikipedia_revisions.sh
old mode 100644 (file)
new mode 100755 (executable)
index a53bc3f..f836c47
@@ -1,12 +1,15 @@
 #!/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})
+./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"
@@ -15,3 +18,4 @@ mv wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia
 revs_json="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.json"
 xz wikipedia/data/${revs_json}
 mv wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia
+

Community Data Science Collective || Want to submit a patch?