Skip to content

Instantly share code, notes, and snippets.

@phette23
Created October 27, 2023 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phette23/b3a73e91027fb9ca192af688b5cb78ef to your computer and use it in GitHub Desktop.
Save phette23/b3a73e91027fb9ca192af688b5cb78ef to your computer and use it in GitHub Desktop.
download all VAULT items
#!/usr/bin/env fish
# download ALL live vault items to item.json and metadata.xml files
# 47283 total items, we can download 50 at a time
set total (eq search -l 1 | jq '.available')
set length 50
set pages (math floor $total / $length)
for i in (seq 0 $pages)
set start (math $i \* $length)
echo "Downloading items $start to" (math $start + $length)
eq search -l $length --info metadata --start $start > .tmp/$i.json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment