tu

command module
v0.0.0-...-4a854fe Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 12 Imported by: 0

README

Build Status

tu is a batch music tagging helper.

This is basically a tagutil wrapper with some additional features and convenience shortcuts. And concurrency, because... Go!

installation

First, you have to get Go. Note that version >= 1.9 is required.

Second, you have to get tagutil. Note that JSON support is required.

Then, just

$ go get github.com/KenjiTakahashi/tu

should get you going.

usage

w
$ tu w PATTERN FILES...

Writes tags to files based on their filenames. Pattern conforms to tagutil's definition.

e
$ tu e FILES...

Opens interactive editing session for each file. It works by opening a YAML formatted tag list in your $EDITOR.

t
$ tu t [-t TAGS] FILES...

Applies TitleCase transformation to specified files.

If -t flag is present, it should contain a comma separated list of tag names to transform. Otherwise, all found tags are transformed.

r
$ tu r [-Y] PATTERN FILES...

Renames files based on their tags. This actually only calls tagutil -p rename:PATTERN FILES....

If -Y flag is present, all questions are answered YES. Note: If applying a pattern on two different files results in the same filename, this option may eat your files. So be careful.

s
$ tu s <TAG VALUE>... -- FILES...

Sets tags to values in files. Example usage: tu s artist "Jacek Kaczmarski" year 2002 -- "01 - Zapowiedź" "02 - Lot Ikara".

p
$ tu p [-r] [TAGS...] -- FILES...

Purges (removes) specified tags from files. If no tags are specified, removes all tags present in the files.

If -r flag is present, all but the specified tags will be removed.

n
$ tu n [-s START] [-t TOTAL] PATTERN FILES...

Numbers files according to PATTERN in order of specification, starting with 1 or -s START.

Optional -t TOTAL can be specified for patterns utilizing it.

PATTERN is a string in form of:

  • zero or more '0's indicating how much digits should the number have
  • letter 'n' and/or 't' indicating track number and total tracks, respectively
  • any other letters (e.g. '/') remain intact

For example: '0n/t' will result in '01/19', '02/19', ..., '19/19'.

titlecase

There is also a package here named titlecase, which is more or less a rewrite of Stuart Coville's Python library (available here).

It is used to capitalize song names based on NY Times Manual of Style. Meaning, it generally capitalizes first letter of every word, but tries to get proper on "small words" and other corner cases which should not be capitalized.

It was moved to a separate package, so that others can make use of it. Documentation is available through Godoc.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package titlecase provides a helper function for transforming an arbitrary text into a capitalized version, as described by NY Times Manual of Style.
Package titlecase provides a helper function for transforming an arbitrary text into a capitalized version, as described by NY Times Manual of Style.

Jump to

Keyboard shortcuts

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