Datasets:

Modalities:
Text
Formats:
json
Languages:
English
Libraries:
Datasets
pandas
License:
json-schema / fetch_files.sh
michaelmior's picture
Update data with commits
9f91866 verified
raw
history blame
425 Bytes
#!/bin/bash
pv commits.json |
jq -r '("https://raw.githubusercontent.com/" + .repository) as $url | .path as $path | .commits[] | $url + "/" + .sha + "/" + $path' |
while read url; do
# Strip the url prefix to get the path
path=$(echo "$url" | cut -d/ -f4-)
if ! [ -f "data/$path" ]; then
curl "$url" --silent --create-dirs -o "data/$path"
sleep 1
fi
done