#hosting #center #html #service #data #sed #thg

thghosting-data-centers

THG Hosting Data Centers

2 releases

0.1.1 Nov 26, 2022
0.1.0 Dec 16, 2021

#11 in #hosting

Apache-2.0 OR MIT

12KB
244 lines

thghosting-data-centers

Dev

curl -L https://www.ingenuitycloudservices.com/network/data-centers/ -o tests/data-centers.html
sudo pacman -S js-beautify

curl -sS https://thg-hosting-master100tbcorp.netdna-ssl.com/views/js/production-stable.min.js?v=1667413195 \
    | js-beautify \
    | sed -n '/^            dataCentres: \[{$/,/^            }\]$/p' \
    | sed '1i{' \
    | sed '$a}' \
    | node -r fs -e 'console.log(JSON.stringify(eval(fs.readFileSync("/dev/stdin", "utf-8")), null, 4));' \
    > tests/data_centers.json

Dependencies

~4–11MB
~101K SLoC