Hello everyone,
lately I've been tinkering around with audio files / playback and notice the lack of support of metadata handling in Nim (except a c wrapper for taglib). So I'm pleased to announce metatag a metadata reading & writing library written from scratch in Nim. It depends only on nimlang/zip and zlib & iconv (on Unix) and currently supports id3v2.3.0 and flac metadata. Metatag is relatively "low level" and gives you raw access to relevant frames & pictures. The Usage Section on the Github Page shows you a variety of examples and the most typical usecases. Here is a quick example on how to read a mp3 in metatag :
import metatag/id3
var tag = readId3("music.mp3")
for textFrame in tag.textFrames:
echo fmt"id: {textFrame.id}"
echo fmt"content: {textFrame.content}"
for userDefinedFrame in tag.userDefinedFrames:
echo fmt"id: {userDefinedFrame.id}"
echo fmt"description: {userDefinedFrame.description}"
echo fmt"content: {userDefinedFrame.content}"
for (i, picture) in enumerate(1, tag.attachedPictures):
echo fmt"picture: '{picture.mime}', '{picture.pictureType}', '{picture.description}'"
This seems really useful!
If you're looking to reduce the number of shared lib dependencies, I can recommend zippy as a pure-nim replacement for zlib :)