An experiment in writing a golang CLI to replace some of my ruby scripts for managing/manipulating mp3s.
Note: These scripts are fairly customized to my use-case.
tn (command)Set the cover image based on filenames. Running the artwork command will update the cover art if an image is found with a matching filename.
tn artworkBasically, it assumes your files look like this:
ls ~/Downloads/
Owsey - And Then I Woke Up.jpg
Owsey - And Then I Woke Up.mp3Removes all existing id3 tags from all mp3s in the current directory.
tn clearSet the cover image for a group of mp3 files in a directory. Assumes an image cover.jpg exists in the directory in which you are running the command.
tn coverLoad all mp3s in the current directory into iTunes.
tn itunesSet artist name:
tn tag --artist "Owsey"Set the album name:
tn tag --album "To The Child Drifting Out At Sea"Set the title:
tn tag --title "I've Lost All Light In My Life"By default, these commands will set on all mp3s in a given directory. For artist and album, this is probably desired but for song titles you probably will want to specify the file to update:
tn tag --title "I've Lost All Light In My Life" --file song.mp3Multiple flags can be passed at once:
tn tag --artist "Owsey" --album "To The Child Drifting Out At Sea"Autotagging is a bit of a unique use-case. If your files are named in the format <artist name> - <song title>.mp3, you can use the --auto flag to set the artist and title for all files in a directory using:
tn tag --autoView the current tags on mp3s in the current directory:
tn tagsIf you'd like to see if there's an image, you can pass the --artwork flag:
tn tags --artworkCopyright (c) 2016 Steve Agalloco.