Last active
July 3, 2023 18:35
-
-
Save timtomch/e36624719d25de1ed7a5e286ba6b6805 to your computer and use it in GitHub Desktop.
Break down media objects by type for Smithsonian elements
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
#!/bin/zsh | |
setopt extendedglob | |
echo "\nMedia type breakdown for CC0 objects:\n" | |
for file in ^index.txt | |
do | |
cat $file |jq -c '. | select((.type=="edanmdm") and (.content.descriptiveNonRepeating.online_media.mediaCount>0) and (.content.descriptiveNonRepeating.online_media.media[].usage.access=="CC0")) | .content.descriptiveNonRepeating.online_media.media[].type' | |
done | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment