commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
echoprint identify your song, then return artist, song name and album name(release) in a JSON. jq parse it and mp3info set the data in your mp3 file.
of course it depends on:
You need to set the environment variable
You can use it with find, but probably will bypass the 120 request/minute of developer account key. So, use a sleep to do it.
find -name \*.mp3 | while read $f; do eval echo $(echoprint-codegen "$f" | jq ' ..metadata | "mp3info -a \"" + .artist + "\" -t \"" + .title + "\" -l \"" + .release + "\" \"" + .filename + "\"" ' ) | bash; sleep 1; done
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.