Last active
February 20, 2022 15:53
-
-
Save timka/da59a00f690e42f8a151d1c471781e96 to your computer and use it in GitHub Desktop.
Try all CSV sources from budget.gov.ru/opendata
This file contains 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
curl -s 'http://budget.gov.ru/opendata/list.json' \ | |
| jq '.meta[]|.link' -r \ | |
| xargs curl -s \ | |
| jq '.data[] | .source' -r \ | |
| cut -d' ' -f1 \ | |
| uniq \ | |
| grep -E '.*\.csv$' \ | |
| while read url ; do | |
echo -n "$url:\t" | |
curl -s "$url" \ | |
| head -5 \ | |
| jq -cR 'split(";")' \ | |
>/dev/null \ | |
&& echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment