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:
23
tools/pv.sh
Executable file
23
tools/pv.sh
Executable 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
|
||||
Reference in New Issue
Block a user