Skip to content

Instantly share code, notes, and snippets.

@jhubble
Created March 3, 2023 17:37
Show Gist options
  • Save jhubble/54c348e3a721f538908b216497653195 to your computer and use it in GitHub Desktop.
Save jhubble/54c348e3a721f538908b216497653195 to your computer and use it in GitHub Desktop.
Use JQ to get genres from a mediainfo dump for music files (mp3, etc.)
mediainfo -Output=JSON . > musicFiles.json
cat musicFiles.json |jq '.[].media| "\(."@ref") = \(.track[0].Genre)"' >genres.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment