]> code.communitydata.science - covid19.git/blob - cron-wikipedia_revisions.sh
a53bc3f7009a6779c20fe86b4e55fb6d407d608b
[covid19.git] / cron-wikipedia_revisions.sh
1 #!/bin/bash -x
2
3 TZ="UTC"
4 date_string=$(date +%Y%m%d)
5
6 ./wikipedia/scripts/wikiproject_scraper.py 2> >(tee wikipedia/logs/enwp-wikiproject_scraper-${date_string}.log)
7
8 revs_log="enwp-revisions-${date_string}.log"
9 ./wikipedia/scripts/fetch_enwiki_revisions.py 2> >(tee wikipedia/logs/${rev_log})
10 mv wikipedia/logs/${revs_log} /var/www/covid19/wikipedia/logs/
11
12 revs_tsv="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.tsv"
13 mv wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia
14
15 revs_json="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.json"
16 xz wikipedia/data/${revs_json}
17 mv wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia

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