]> code.communitydata.science - covid19.git/blob - cron-wikipedia_views.sh
ec3d4ec0ae1bb0dda79e33f2a7a411632d741843
[covid19.git] / cron-wikipedia_views.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 # get the list of files
9 view_log="enwp-daily_views-${date_string}.log"
10 ./wikipedia/scripts/fetch_enwiki_daily_views.py 2> >(tee wikipedia/logs/${view_log})
11 cp wikipedia/logs/${view_log} /var/www/covid19/wikipedia/logs/${view_log}
12 cp wikipedia/data/digobs_covid19-wikipedia-enwiki_dailyviews-${date_string}.tsv /var/www/covid19/wikipedia/
13
14 # xz wikipedia/data/digobs_covid19-wikipedia-enwiki_dailyviews-${date_string}.json
15 cp wikipedia/data/digobs_covid19-wikipedia-enwiki_dailyviews-${date_string}.json /var/www/covid19/wikipedia/
16

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