Skip to content

Latest commit

 

History

418 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status: PyPI - CI Actions Status: PyPI - Daily Dependencies Update Actions Status: RubyGem - CI Actions Status: RubyGem - Daily Dependencies Update Actions Status: CodeQL

spreen-tracks

spreen-tracks: an origami falcon stooping from a scattered note into the settled disc across a falcon's-eye stone

Renames the music files iTunes imports so the filenames follow one consistent shape: the space after the track number becomes a configurable delimiter, and N- disc-number prefixes become DiscN/ subdirectories.

The tool ships twice with identical behaviour: as the RubyGems gem spreen-tracks and as the PyPI library spreen-tracks.
Both install the same track-delimiter command.

1. Origin of the Name

stoop + preen = spreen — dive on the scattered filenames, then groom them track by track.
The icon tells the story: the origami falcon (隼 /hayabusa/) mid-stoop across the falcon's-eye stone, diving from the scattered note into the settled disc.

The full legend behind the spreen name — the falcon man, the stone in the rice field, and the falcon's-eye quartz — is told in spreen-wiki's README.
spreen-tracks is part of the spreen-* toolchain (spreen-wiki, spreen-pr, spreen-tracks, spreen-clean): tools that take something scattered and return it settled.

2. Quickstart

Install one of the two implementations:

$ gem install spreen-tracks
$ pipx install spreen-tracks

(pip install spreen-tracks works too if you prefer managing the environment yourself.)

iTunes provides no user interface to control the delimiter when importing songs from CDs: files land as Artist/Album/1-01 Title.m4a, where the 1- prefix is the disc number.
Run the command inside your music directory — with no options it dry-runs, printing every rename it would perform without touching a file:

$ cd ~/Music
$ track-delimiter
Target extension is `.m4a`
========== [DRY RUN] Total File Count to Clean: 4 ==========
========== [DRY RUN] The delimiters of those files will be replaced with `_` ==========
========== [DRY RUN] Start! ==========
========== [DRY RUN] Replacing the delimiter: `./Artist/Album/1-01 Title.m4a` => `./Artist/Album/Disc1/01_Title.m4a` ==========
========== [DRY RUN] Done! ==========
========== [DRY RUN] Total Target File Count: 1 ==========

When the plan looks right, execute it:

$ track-delimiter --mode e
Before After
Artist/Album/1-01 Title.m4a Artist/Album/Disc1/01_Title.m4a
Artist/Album/01 Title.m4a Artist/Album/01_Title.m4a

3. Options

Option Default Description
--extension EXT .m4a Target extension of the files to rename
--delimiter CHAR _ Delimiter that replaces the space after the track number
--mode MODE d d prints the rename plan (dry run); e executes it

Run track-delimiter --help for the full flag list; --version prints the version.
Both packages also expose the logic as a library — see the per-language READMEs in § 4.

4. Development

About

This repository contains Ruby and Python scripts which replace the default delimiter with another you prefer.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages