mp3-set-title

Crates.iomp3-set-title
lib.rsmp3-set-title
version0.1.1
sourcesrc
created_at2024-06-10 04:38:32.300934
updated_at2024-06-10 05:11:31.244915
descriptionSet title of mp3 files in a given directory using their file names
homepage
repository
max_upload_size
id1266805
size35,153
Douglas Wu (wckdouglas)

documentation

README

MP3 set title

MP3 files loading into music players (e.g. car audio players) only show the title from their metadata, instead of their file names. This can create confusion when we compile a library of these mp3 files in a hard drive and connect it to the (car) player.

This is a simple program to set titles of mp3 files using their filenames. We assume the files are named as {album}-{song title}.mp3, and the final mp3 files will have:

  • title: {album}-{song title}
  • album: {album}

rust

The program is written in Rust, and can be installed with cargo install (get started here).

$ cargo install --path .
$ mp3-set-title --help
Set title of mp3 files in a given directory as their file names

Usage: mp3-set-title --mp3-directory <MP3_DIRECTORY>

Options:
  -m, --mp3-directory <MP3_DIRECTORY>  Directory containing all mp3 files
  -h, --help                           Print help
  -V, --version                        Print version

python

A prototype is written in python and dependencies are managed by poetry.

$ poetry run python python/mp3-set-title.py --help
Usage: mp3-set-title.py [OPTIONS]

  Set title of mp3 files in a given directory as their file names

  assuming the file is named as {album}-{song}.mp3

  :param str mp3_directory: Directory containing all mp3 file :raises
  ValueError: if the given directory does not exist

Options:
  -m, --mp3-directory TEXT  Directory containing all mp3 files  [required]
  --help                    Show this message and exit.
Commit count: 0

cargo fmt