From 4cf7b9b2edf3c4fcfe23f899b16475907244d9a3 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sun, 16 Oct 2022 02:39:49 +0800 Subject: [PATCH] feat: check script for `ixsw.la` --- src/ixsw.la/check.sh | 6 ++++++ src/ixsw.la/crawler.sh | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) create mode 100755 src/ixsw.la/check.sh diff --git a/src/ixsw.la/check.sh b/src/ixsw.la/check.sh new file mode 100755 index 0000000..ab2bc6b --- /dev/null +++ b/src/ixsw.la/check.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +cd `dirname $0` + +diff <(xz -cdk ./archive/catalog.json.xz | jq .) <(cat ./data/catalog.json | jq .) +diff <(xz -cdk ./archive/xxrs.json.xz | jq .) <(cat ./data/xxrs.json | jq .) diff --git a/src/ixsw.la/crawler.sh b/src/ixsw.la/crawler.sh index 4f53aca..4a5836b 100755 --- a/src/ixsw.la/crawler.sh +++ b/src/ixsw.la/crawler.sh @@ -6,12 +6,3 @@ mkdir -p ./data/html/ python3 catalog.py > ./data/catalog.json python3 fetch.py ./data/catalog.json ./data/html/ python3 extract.py ./data/catalog.json ./data/html/ > ./data/xxrs.json - -cd ./data/ -xz -k9 catalog.json -tar cJf html.tar.xz html/ -xz -k9 xxrs.json - -mkdir -p ../archive/ -mv *.xz ../archive/ -cd ../