Created
October 27, 2023 23:01
-
-
Save phette23/b3a73e91027fb9ca192af688b5cb78ef to your computer and use it in GitHub Desktop.
download all VAULT items
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
#!/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