id3conv

package module
v0.0.0-...-11da0ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

id3conv: a commandline tool to fix encoding error in music files

Currently, id3conv supports only conversion from GBK to UTF-8 assuming the ID3 tags were incorrectly encoded in latin-1 or ISO-8859-1 and decoded as UTF-8 on Unix-like systems.

requirements

  • go >= 1.8
  • dep >= 0.5

installation

  1. clone this repo
  2. dep ensure
  3. cd main && go build
  4. cp main where_you_wanna_be/id3conv
  5. run it like id3conv ${musicFile1} ${musicFile2}
  6. enjoy correct UTF-8 meta info in your music

integrate with macOS context menu with automator

  1. open automator
  2. create an empty service
  3. set workflow receives current <- audio files in Finder
  4. look for run shell script on the left menu and drag it in
  5. input a script like this:
for f in "$@"
do
	/usr/local/bin/id3conv "$( echo "$f" | sed 's/ /\ /g' )"
done

Suppose you save your main binary as /usr/local/bin/id3conv.

  1. save this service and you can use it in Finder

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(filename string)

Convert convert the tag of the given music file to UTF8 encoding

func GbkToUtf8

func GbkToUtf8(s []byte) ([]byte, error)

GbkToUtf8 convert a GBK byte array to a UTF8 encoded one

func Utf8ToGbk

func Utf8ToGbk(s []byte) ([]byte, error)

Utf8ToGbk convert a UTF8 byte array to a GBK encoded one

func Utf8ToLatin

func Utf8ToLatin(s []byte) ([]byte, error)

Utf8ToLatin convert a UTF8 byte array to a Latin1 encoded one

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL