Skip to content

Instantly share code, notes, and snippets.

@jhpoelen
Last active June 22, 2024 09:41
Show Gist options
  • Save jhpoelen/f4a2a98ebbf13c6675f0e5e196f64a25 to your computer and use it in GitHub Desktop.
Save jhpoelen/f4a2a98ebbf13c6675f0e5e196f64a25 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# streams Wikidata taxon items (or items containing https://www.wikidata.org/wiki/Q16521)
# from latest data dump in line json (one json object per line)
#
curl --silent "https://dumps.wikimedia.org/wikidatawiki/entities/latest-all.json.bz2"\
| bunzip2\
| grep -E "Q16521[^0-9]"\
| sed 's/,$//g'\
| bzip2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment