Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 170b450

Browse files
committed
fetch and extract course data from raw url
1 parent 3a11973 commit 170b450

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.travis/deploy.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@ fi
1818

1919
if [[ "$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_BRANCH" == "$SOURCE_BRANCH" ]]; then
2020
echo 'start running crawler'
21-
./bin/ntust
21+
REPO_BASE_URL=`git config remote.origin.url | sed 's/\.git//g'`
22+
while IFS= read -r org_code
23+
do
24+
RAW_DATA_URL="$REPO_BASE_URL/raw/data/$org_code.gz"
25+
26+
echo "downloading $org_code data from $RAW_DATA_URL"
27+
curl -L $RAW_DATA_URL --output "$org_code.gz"
28+
29+
echo "unzipping..."
30+
gzip -d < "$org_code.gz" > "$org_code.json"
31+
32+
echo "extracting..."
33+
./.travis/extract_json "$org_code.json"
34+
done < "support_organizations.txt"
2235
fi
2336

2437
# Save some useful information

support_organizations.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ntust

0 commit comments

Comments
 (0)