GNAT is a small audio collection tool to associate local audio files with semantic web URIs.

GNAT creates small RDF files in the folders of your music collection, such as :


These can then be used by a tool such as gnarql[1] to expose this information through a SPARQL endpoint and allow futher information to be gathered about your collection.


- Written and tested on python 2.4 but may work fine on 2.3 or 2.5 - let us know if you try :)
- Python libraries :
- rdflib v2.4.0 [2] (easy_install)
- mutagen v1.11 [3] (easy_install)
- musicbrainz2 SVN later than 02/08/2007 (sorry) [4]

- genpuid [5] (included)
- mopy [1] (included)

- Track lookup based on local metadata :
./ metadata /path/to/music

- Track lookup based on MusicDNS fingerprinting :
./ fingerprint /path/to/music

- Clean all .rdf files :
./ clean /path/to/music

Note : the metadata and fingerprinting lookups may safely be run in parallel.


If you do not have filesystem access to the audio collection you wish to identify,
or wish to override the local metadata available in tags, you may run GNAT in
metadata mode using a CSV file as input, with lines of the form :

URI, Artist Name, Album Name, Track Name
URI, Artist Name, Album Name, Track Name, Track Number

The URI may be any unique identifier you wish, but for the generated RDF to be useful,
we suggest using identifiers from a HTTP namespace you control, or local file:// URIs

If you prefer simple CSV output, use the -c command line switch, and an info_metadata.csv
file will be created with lines of the form :

local URI, Semantic Web URI

For example :
./ -c metadata test.csv
will run GNAT on each file described in test.csv, outputting the resulting URIs to the
file info_metadata.csv.