perkeep/third_party/taglib
Hunter Freyer 6940b3991f Basic code to index id3 (and other audio) tags.
Does a few things:

1) Adds gotaglib to third_party. If you'd like to review that, feel
free, though there's a bit of organization I'd like to do first.

2) Adds an "audioTag" key type.

3) Indexes wholerefs by various audio tags. Doesn't yet add a map from
wholeref to tags, but I can add that next.

Change-Id: I8e2a5bc27260086bad3351ac57973d1ac23cff44
2013-09-02 14:39:51 -04:00
..
id3 Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
testdata Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
.gitignore Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
LICENSE Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
README.md Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
taglib.go Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00
taglib_test.go Basic code to index id3 (and other audio) tags. 2013-09-02 14:39:51 -04:00

README.md

gotaglib

Apache-licensed audio tag decoding library written in pure go. Designed to mirror the structure of taglib without being a direct port.

tl;dr

go get github.com/hjfreyer/gotaglib
import "github.com/hjfreyer/gotaglib"
...
func main() {
    f, err := os.Open("song.mp3")
    tag, err := gotaglib.Decode(f)
    fmt.Print(tag.Title())
}

Features

Currently has basic read support for id3v2.3 and id3v2.4. No writing support yet.

Goals

  • Pure go.
  • Not necessarily feature complete, but future compatible.
  • Good interfaces.
  • Handle errors properly (don't panic).

Why didn't you just use… ?

There are many other Go projects which do tag parsing, but all the ones I found violate at least one of the goals above.

Why don't you support… ?

Probably no reason other than it hasn't happened yet. If you need a particular format, or an additional feature, or you've found a file which gotaglib should parse but doesn't, please create an issue, or better yet, send a patch.