cursedtag
cursedtag copied to clipboard
A console audio tag editor.
cursedtag
A console audio tag editor.
- Works in terminal / console.
- Tiny (written in bash, using few external utilities).
- Supports mp3, ogg & flac files.
- Inspired by EasyTAG's features and cursetag's look (and name).
- Can operate on multiple files:
- apply field to all selected files,
- bulk rename files based on tags,
- fill tags from file names
Table of Contents
- Dependencies
- Usage
- Invocation
- Customization
- Why?
Dependencies
bash 4.4+coreutilscd,mkdir,du,tr,cut,find,grep,sed.
perl- Used for non-greedy regex capturing.
sox- For retrieving bitrate, duration & length from audio files.
mid3v2metaflacvorbiscomment- Optional. Programs for handling audio tags.
All of these should be readily available in most distributions.
Usage
There are thre modes in cursedtag - file selector, editor & scanner.
-
Selector mode:
- space - mark/unmark selected file
- a, ctrl-a - mark/unmark all files
- r - rename files in scanner mode
- f - fill tags in scanner mode
- →, enter, esc - go to tag editor
- y - yank filename
- q, ctrl-c - quit
-
Editor mode:
- enter, a - edit field (cursor at end)
- i - edit field (cursor at start)
- s, w - save changes to current file
- S, W - apply field to all marked files
- u - undo changed field
- ←, esc - go file selector
- y - yank field
- p - paste
- q, ctrl-c - quit
For moving around, you can use arrow keys, enter/escape, home/end, pgup/pgdown.
Few simple vi-like shortcuts are supported: h/j/k/l, g & G.
Invocation
$ cursedtag ~/Music
- Opens given directory in file selector mode.
$ cursedtag ~/Music/file.mp3
- Opens the file in editor mode. The file selector is pointed to ~/Music.
Customization
You can customize the program by setting following environment variables:
# Space-separated list of tag field IDs.
CURSEDTAG_FIELDS=…
# Value of this variable will be inserted
# into prompts of file rename & fill tags modes.
CURSEDTAG_DEFAULT_TEMPLATE=…
# Override colors by assigning escape sequences into these variables.
CURSEDTAG_COLOR_ERROR=…
CURSEDTAG_COLOR_OPTION=…
CURSEDTAG_COLOR_STATUS=…
CURSEDTAG_COLOR_MARKED=…
CURSEDTAG_COLOR_SUCCESS=…
CURSEDTAG_COLOR_SELECTED=…
# Symbol of marked files ("*" by default)
CURSEDTAG_SYMBOL_MARKED=…
# Command that the yanked text will be piped into. Empty by default.
CURSEDTAG_COMMAND_YANK=…
Program also sources ~/.config/cursedtag/rc file, if it exists. Here's an example
of one that doesn't override already set environment variables:
: ${CURSEDTAG_DEFAULT_TEMPLATE:="%a - %n"}
: ${CURSEDTAG_FIELDS:="title album artist"}
: ${CURSEDTAG_COLOR_STATUS:=$'\e[35m'}
: ${CURSEDTAG_COMMAND_YANK:="xclip -f -in -sel primary | xclip -in -sel clipboard"}
Why?
musophobia (n.)
— a strong dislike of mice
hellricer (<) 2019