mirror of https://github.com/perkeep/perkeep.git
6940b3991f
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 |
||
---|---|---|
.. | ||
id3 | ||
testdata | ||
.gitignore | ||
LICENSE | ||
README.md | ||
taglib.go | ||
taglib_test.go |
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.