Last active
October 2, 2016 18:04
-
-
Save anddam/a7b01b54a3522b722283d9af972dedb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import json | |
import sys | |
if __name__ == '__main__': | |
with open(sys.argv[1]) as jdata: | |
data = json.load(jdata) | |
# fetch identification data | |
identifiers = {d['description'][12:]:d['value'] | |
for d in data['identifiers'] | |
if 'description' in d} | |
for d in data['tracklist']: | |
if 'position' in d: | |
position = d['position'] | |
identifier = identifiers[position] if position in identifiers else "NOT FOUND" | |
print("%s - %s" % (position, identifier)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment