How to submit listening data via command line?

Tags: #<Tag:0x00007f646f70b310>


I was looking into a way to submit listening data from my dlna server to listenbrainz.
The mediaserver (minimserver) does not record listening data but If I watch the logfiles I can extract the files that are being served. feeding these files to beets I can extract the recording mbid (or whatever would be best to submit?) and build a submit listen JSON document as described here [1]. However since I’m not familiar with JSON I have no idea how to get this to the listenbrainz server with authentication and so on. Is there a easy way to make this work?
or is there a helper-script that I can submit data with?



create a json blob such as the example and write this to json.txt

You can then send this file using curl:
curl -d @json.txt -H “Authorization: token xxxxxx” --header “Content-Type:application/json”