From 17f4f77bef1de90435dd5de572169c1a738a3c85 Mon Sep 17 00:00:00 2001 From: David Howden Date: Sun, 28 Jun 2015 10:43:57 +1000 Subject: [PATCH] Update README to include simple code example. Fix small grammatical error too! --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbf0be2..f8d1116 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,15 @@ This package provides MP3 (ID3v1,2.{2,3,4}) and MP4 (ACC, M4A, ALAC), OGG and FLAC metadata detection, parsing and artwork extraction. +Detect and parse tag metadata from an `io.ReadSeeker` (i.e. an `*os.File`): + + m, err := tag.ReadFrom(f) + if err != nil { + log.Fatal(err) + } + log.Print(m.Format()) // The detected format. + log.Print(m.Title()) // The title of the track (see Metadata interface for more details). + Parsed metadata is exported via a single interface (giving a consistent API for all supported metadata formats). // Metadata is an interface which is used to describe metadata retrieved by this package. @@ -35,9 +44,9 @@ construct the checksum. [http://godoc.org/github.com/dhowden/tag#Sum](http://godoc.org/github.com/dhowden/tag#Sum) -## Example Usage +## Tools -There are a simple command-line tools which demonstrate basic tag extraction and summing: +There are simple command-line tools which demonstrate basic tag extraction and summing: $ go get github.com/dhowden/tag/... $ cd $GOPATH/bin