Skip to content

dggsax/library-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Library Manager

A command-line tool for managing MP3 files, converting audio formats, and working with ID3 metadata tags.

Installation

cargo build --release

The binary will be available at target/release/library-manager.

Requirements

  • ffmpeg - Required for WAV to MP3 conversion
    • macOS: brew install ffmpeg
    • Linux: apt-get install ffmpeg or yum install ffmpeg
    • Windows: Download from ffmpeg.org

Commands

prepare

Process MP3 files in a directory structure and set genre tags based on folder names.

Usage:

library-manager prepare --directory <PATH>
library-manager prepare -d <PATH>

Description:

  • Scans the specified directory for subdirectories
  • For each subdirectory, processes all MP3 files inside
  • Sets the genre tag of each MP3 file to match the folder name

Example:

library-manager prepare --directory /path/to/music

If your music is organized like:

/path/to/music/
├── Rock/
│   ├── song1.mp3
│   └── song2.mp3
└── Jazz/
    └── song3.mp3

All files in the Rock folder will have their genre set to "Rock", and files in Jazz will be set to "Jazz".


convert

Convert a WAV file to MP3 format.

Usage:

library-manager convert --input <FILE> [--bitrate <BITRATE>]
library-manager convert -i <FILE> [-b <BITRATE>]

Options:

  • --input, -i - Path to the input WAV file (required)
  • --bitrate, -b - Bitrate for MP3 encoding in kbps (default: 320)

Description:

  • Converts a WAV file to MP3 format
  • Output file is created in the same directory with the same name but .mp3 extension
  • Automatically preserves the original audio properties (sample rate, channels)
  • Uses ffmpeg for conversion

Examples:

# Convert with default 320k bitrate
library-manager convert --input song.wav

# Convert with custom 192k bitrate
library-manager convert --input song.wav --bitrate 192

# Using short flags
library-manager convert -i song.wav -b 256

Common Bitrates:

  • 128k - Acceptable quality, smaller files
  • 192k - Good quality
  • 256k - Very good quality
  • 320k - Maximum MP3 quality (default)

info

Display metadata information from an MP3 file.

Usage:

library-manager info --file <FILE>
library-manager info -f <FILE>

Description:

  • Reads and displays ID3 metadata tags from an MP3 file
  • Shows information such as title, artist, album, genre, track numbers, duration, and embedded images

Example:

library-manager info --file song.mp3

Sample Output:

Metadata for: song.mp3
============================================================
Title:        My Song
Artist:       The Artist
Album:        The Album
Genre:        Rock
Year:         2024
Track:        5/12
Duration:     3:45
Pictures:     1 embedded image(s)
============================================================

Global Options

  • --help, -h - Display help information for any command
  • --version, -V - Display version information

Examples:

library-manager --help
library-manager prepare --help
library-manager --version

License

[Add your license here]

Contributing

[Add contributing guidelines here]

About

A CLI for managing my DJ library, written in Rust!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages