web/pv.sh

22 lines
334 B
Bash
Raw Normal View History

2019-09-30 15:38:41 +03:00
#!/bin/bash
#
# Fetch Google Analytics Pageviews reporting cache
# and save as 'assets/data/pagevies.json'
#
# Requirement:
# - jq
# - wget
#
# © 2019 Cotes Chung
# MIT Licensed
URL_FILE=assets/data/proxy.json
PV_CACHE=assets/data/pageviews.json
set -eu
PROXY_URL=$(jq -r '.proxyUrl' $URL_FILE)
wget $PROXY_URL -O $PV_CACHE