Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
n10v committed Aug 25, 2018
1 parent 6a143b6 commit fbae0c6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
**Fast, simple and powerful ID3 parsing and writing library for Go, based only on standard library.**

id3v2 can:

* ✅ support of ID3v2.3 and ID3v2.4 tags;
* ✅ parse and write tags;
* ✅ work with all available encodings;
* ✅ set and read artist, album, year, genre, other text frames, unsynchronised lyrics/text (USLT),
comments and attached pictures;
* ✅ set and read several USLTs, comments and attached pictures;
* ✅ set and read all text frames, unsynchronised lyrics/text (USLT),
comments, attached pictures, UFID and TXXX frames;
* ✅ set and read frames, that can be used multiple times in tag;
* ✅ be used in multiple goroutines.

id3v2 can't:

* ❌ do unsyncronization;
* ❌ work with extended header, flags, padding, footer.

If you want some functionality, that library can't do,
or you have some questions, just write an issue. **And of course, pull requests are welcome!**

## Installation
$ go get -u github.com/bogem/id3v2

$ go get -u github.com/bogem/id3v2

## Example of usage

```go
package main

Expand Down Expand Up @@ -65,6 +69,7 @@ func main() {
```

## Read multiple frames

```go
pictures := tag.GetFrames(tag.CommonID("Attached picture"))
for _, f := range pictures {
Expand All @@ -80,6 +85,7 @@ for _, f := range pictures {
```

## Options

```go
// Options influence on processing the tag.
type Options struct {
Expand All @@ -100,10 +106,12 @@ type Options struct {
```

## Work with encodings

id3v2 can encode and decode text of avaialble encodings (ISO-8859-1,
UTF-16 with BOM, UTF-16BE without BOM, UTF-8). Just set [the desired encoding](https://github.com/bogem/id3v2/blob/master/encoding.go#L27) in `Encoding` field of frame and set UTF-8 encoded text to corresponding text fields.

For example, if you set comment frame with custom encoding and write it:

```go
tag := id3v2.NewEmptyTag()
comment := id3v2.CommentFrame{
Expand All @@ -119,6 +127,7 @@ if err != nil {
log.Fatal(err)
}
```

`Text` field will be automatically encoded with UTF-16BE with BOM and written to w.

By default, if version of tag is 4 then UTF-8 is used for methods like
Expand Down

0 comments on commit fbae0c6

Please sign in to comment.