Skip to main content

Posts

Showing posts with the label linux

ISRC codes in Discogs (part 2)

It is time to dive into ISRC codes a bit more. If you don't know what these codes are, then it is probably good to read part 1 first. In this article I will not really look at ISRC codes in Discogs (OK, just a tiny bit), but instead look at how to extract ISRC codes on a Linux machine using Python. For this I will use libdiscid and its Python bindings . What you need for this: a computer with a CD/DVD drive (which is getting surprisingly hard with laptops these days) a Linux distribution (in my case Fedora 27, but any recent Linux distribution will do) libdiscid with associated Python bindings (either Python 2 or Python 3) It is actually very simple and can be done from either the Python prompt or from a simple script. It is literally as simple as this (Python 3 code, I stored it in a file called isrc.py): import libdiscid disc = libdiscid.read() try:     track_isrcs = disc.track_isrcs     for i in range(0,len(track_isrcs)):   ...