1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Moved the script tools.

This commit is contained in:
Cotes Chung
2020-01-02 01:21:43 +08:00
parent 5bb810875b
commit 3e004d1bf3
9 changed files with 237 additions and 209 deletions

23
tools/pv.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
#
# Fetch Google Analytics Pageviews reporting cache
# and save as 'assets/data/pagevies.json'
#
# Requirement:
# - jq
# - wget
#
# © 2019 Cotes Chung
# MIT Licensed
set -eu
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
URL_FILE=${WORK_DIR}/assets/data/proxy.json
PV_CACHE=${WORK_DIR}/assets/data/pageviews.json
PROXY_URL=$(jq -r '.proxyUrl' $URL_FILE)
wget $PROXY_URL -O $PV_CACHE