Last active
April 26, 2024 19:26
-
-
Save jhubble/0a46b867c1160112965613da5055a97e to your computer and use it in GitHub Desktop.
Get statistics of music by year from iTunes (Mac Music) library
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
# First export the iTunes ( aka "Music") Library.xml | |
# Get a list of all years present | |
cat Library.xml|grep Year |grep integer |sed 's/[^0-9]*//g' |sort |uniq >allyears.txt | |
# get a list of years to compare against (change to appropiate start and end years) | |
seq 1500 2024 >from1500.txt | |
# now see which years are missing | |
comm -13 allyears.txt from1500.txt | |
# To see what are the most common years: | |
cat Library.xml|grep Year |grep integer |sed 's/[^0-9]*//g' |sort |uniq -c |sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment