Implement music file organization in shanty-org
#5
Notifications
Total Time Spent: 10 minutes
connor
10 minutes
No due date set.
Dependencies
No dependencies set.
Reference: Shanty/Main#5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
shanty-orgcrate is responsible for organizing music files into a clean directory structure and renaming them according to a configurable format. Many music libraries are a mess of random filenames and flat folders — this crate fixes that.This issue covers:
Directory structure generation — given a target root directory and a format template, move/copy music files into the correct structure. The default structure should be:
For example:
Music/Pink Floyd/The Dark Side of the Moon/03 - Time.flacFormat templates — support a simple template syntax for both directory structure and filename. Available variables should include at minimum:
{artist}— track or album artist{album_artist}— album artist (falls back to artist){album}— album name{title}— track title{track_number}— zero-padded track number (e.g., "03"){disc_number}— disc number{year}— release year{genre}— genre{ext}— file extensionSafe file operations — this crate moves actual files, so it must be very careful:
shanty-dbdatabase after movingCLI interface — the
shanty-orgbinary should accept:--source <dir>— source directory (or use DB paths)--target <dir>— target root directory--format <template>— format template (with a sensible default)--dry-run— preview changes without moving files--copyvs--move— whether to copy or move files (default: move)--from-db— organize all tracks known to the databaseDesign Considerations
Acceptance Criteria
--dry-runshows planned moves without executing them--from-db)Dependencies