SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
BASE_DIR="$(dirname "$SCRIPT_DIR")" | |
RAW_DIR="$BASE_DIR/raw" | |
mkdir -p "$RAW_DIR" | |
urls=( | |
"https://datarepo.eng.ucsd.edu/mcauley_group/gdrive/goodreads/byGenre/goodreads_books_comics_graphic.json.gz" | |
"https://datarepo.eng.ucsd.edu/mcauley_group/gdrive/goodreads/byGenre/goodreads_reviews_comics_graphic.json.gz" | |
"https://datarepo.eng.ucsd.edu/mcauley_group/gdrive/goodreads/goodreads_book_genres_initial.json.gz" | |
) | |
for url in "${urls[@]}"; do | |
wget -P "$RAW_DIR" "$url" | |
done | |
for file in "$RAW_DIR"/*.gz; do | |
gunzip "$file" | |
done | |
echo "Download and extraction complete." | |