Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.22 KB

File metadata and controls

28 lines (19 loc) · 1.22 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

A single Bash script (flac-alac-converter.sh) that batch-converts FLAC files to ALAC (.m4a) using ffmpeg. No build system, no tests, no dependencies beyond ffmpeg.

Running the script

chmod +x flac-alac-converter.sh
./flac-alac-converter.sh              # convert all albums
./flac-alac-converter.sh --dry-run   # preview, no files written
./flac-alac-converter.sh file.flac   # convert a single file

Git commits

Never add a Co-Authored-By: Claude trailer to commit messages.

Key conventions

  • In batch mode (no arguments), the script auto-discovers all subdirectories containing .flac files, skipping any already-converted ALA dirs.
  • Output directories are named <album> ALA (sibling to the source directory).
  • ffmpeg flags: -c:a alac -c:v copy — lossless audio conversion, video stream (cover art) copied unchanged.
  • (( i++ )) || true and (( total++ )) || true are intentional: (( expr )) exits 1 when expr is 0, so || true prevents zsh from aborting in strict mode.
  • ffmpeg is the only runtime dependency — assume it is installed via Homebrew on macOS.