Created
November 21, 2020 02:52
-
-
Save samcamwilliams/26e0505d11a7c25cafc95e08c5be9c13 to your computer and use it in GitHub Desktop.
Download the state of all land parcels in CryptoVoxels and deploy them to the Arweave's permaweb. Path to your Arweave keyhole must be changed in the `arweave deploy` line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p CryptoVoxelsArchive/parcels | |
echo "Downloading map info..." | |
curl -s 'https://www.cryptovoxels.com/api/parcels.json' > CryptoVoxelsArchive/parcels.json | |
curl -s 'https://www.cryptovoxels.com/api/suburbs.json' > CryptoVoxelsArchive/suburbs.json | |
curl -s 'https://www.cryptovoxels.com/api/islands.json' > CryptoVoxelsArchive/islands.json | |
cat CryptoVoxelsArchive/parcels.json | jq '.parcels | .[] | .id' | while read id ; | |
do | |
echo "Downloading land parcel info $id..." | |
curl -s "https://www.cryptovoxels.com/grid/parcels/$id" > CryptoVoxelsArchive/parcels/$id.json ; | |
done | |
echo "Creating zip." | |
zip -r -q CryptoVoxels-latest-archive.zip CryptoVoxelsArchive | |
echo "Deploying archive to Arweave." | |
arweave deploy --force-skip-confirmation CryptoVoxels-latest-archive.zip --key-file PATH_TO_YOUR_KEYFILE --tag AppName:CryptoVoxelsArchive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment