From 7ce965720eb388735601a4b09d1f300efd1de146 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Tue, 25 Apr 2023 01:41:26 -0700 Subject: [PATCH] :sparkles: Personal script to help with citystas proj --- scripts/citystats | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/citystats diff --git a/scripts/citystats b/scripts/citystats new file mode 100755 index 00000000..e23d89c9 --- /dev/null +++ b/scripts/citystats @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Usage: citystats states 3 house_delegation 2 + +# Note: Personal script to automate away some work on my citystats api, perhaps write blog post about it later? +entity=$1 +entity_id=$2 +query=$3 +id=$4 + +final=$(~/scripts/jscurl "citystats.xyz/${entity}/${entity_id}/${query}/${id}" | grep "${query}" | awk -F':' '{print $2}' | awk '{sub(/^ */, "") ; print}' | sed 's/"//g' | sed 's/ /_/g') + +librewolf "https://en.wikipedia.org/wiki/${final}?useskin=vector"