Browse Source

feat: check script for `ixsw.la`

master
Dnomd343 2 years ago
parent
commit
4cf7b9b2ed
  1. 6
      src/ixsw.la/check.sh
  2. 9
      src/ixsw.la/crawler.sh

6
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 .)

9
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 ../

Loading…
Cancel
Save