Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] CD ripper that generates song titles?
Date: Sat, 29 Aug 2015 01:09:45
Message-Id: 20150829010931.GA3724@waltdnes.org
In Reply to: Re: [gentoo-user] CD ripper that generates song titles? by Neil Bothwick
1 On Thu, Aug 27, 2015 at 10:00:54PM +0100, Neil Bothwick wrote
2 > On Thu, 27 Aug 2015 15:42:46 -0400, Walter Dnes wrote:
3 >
4 > > Title-artist-based filenames are harder than it looks. I'm working on
5 > > a bash script to generate title_-_artist.flac filenames from
6 > > audio_nn.inf data. Then I'll pass that name to flac's "-o" parameter.
7 >
8 > Why reinvent the wheel? abcde is a shell script that does this and much
9 > more. It uses whichever ripper, encoder etc. that you want, with whatever
10 > options you want.
11
12 I like to putter around with bash scripts. I've written up a 146-line
13 script (83 lines of script plus 63 lines of comments) that handles
14 things to *MY* specs for *MY* needs. It processes .inf and .wav files
15 in a directory, creating flac files in a flac subdirectory. I haven't
16 tested it under all conditions, but it tries to handle...
17
18 * Check for a "flac" subdirectory; create one if it doesn't already exist
19 * If "Tracktitle" field is empty, bail out.
20 * If "Tracktitle" field contains a slash ("/"), assume that the artist's
21 name is to the left of the slash, and the song name is on the right
22 side of the slash.
23 * If "Tracktitle" field is non-empty, but doesn't contain a "/", assume
24 that it only has the title.
25 - Get the artist name from the "Performer" field.
26 - If "Performer" field is empty, use "Albumperformer" field.
27 - If both are empty, set artist name to "Unknown".
28 * The flac files are created in the "flac" subdirectory
29
30 --
31 Walter Dnes <waltdnes@××××××××.org>
32 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] CD ripper that generates song titles? Neil Bothwick <neil@××××××××××.uk>