From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 007361384C0 for ; Sat, 29 Aug 2015 01:09:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5D6614229; Sat, 29 Aug 2015 01:09:36 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 9074A1419A for ; Sat, 29 Aug 2015 01:09:35 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DjFQA731xV/52nxEVcgxCBMoglwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBBDocMwsYCRMSDwUlN4gszyMBAQEHAgEfizqFDBaDAYEWBYtEhyx3igiHeI1YgUUjhBQiMYJHAQEB X-IPAS-Result: A0DjFQA731xV/52nxEVcgxCBMoglwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBBDocMwsYCRMSDwUlN4gszyMBAQEHAgEfizqFDBaDAYEWBYtEhyx3igiHeI1YgUUjhBQiMYJHAQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="161743864" Received: from 69-196-167-157.dsl.teksavvy.com (HELO waltdnes.org) ([69.196.167.157]) by ironport2-out.teksavvy.com with SMTP; 28 Aug 2015 21:09:33 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Fri, 28 Aug 2015 21:09:31 -0400 From: "Walter Dnes" Date: Fri, 28 Aug 2015 21:09:31 -0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] CD ripper that generates song titles? Message-ID: <20150829010931.GA3724@waltdnes.org> References: <20150826200610.GA22849@waltdnes.org> <20150826225803.08cffa46@thetick> <20150826225317.GA23022@waltdnes.org> <55def686.chdf8A+Ii/EUSrDs%Joerg.Schilling@fokus.fraunhofer.de> <20150827194246.GA26102@waltdnes.org> <20150827220054.7f1f938a@digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150827220054.7f1f938a@digimed.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Archives-Salt: 41ded74a-eb06-4cfc-a223-30f1d0a5fcac X-Archives-Hash: dca0bcaab354a95cc750464f11ff9926 On Thu, Aug 27, 2015 at 10:00:54PM +0100, Neil Bothwick wrote > On Thu, 27 Aug 2015 15:42:46 -0400, Walter Dnes wrote: > > > Title-artist-based filenames are harder than it looks. I'm working on > > a bash script to generate title_-_artist.flac filenames from > > audio_nn.inf data. Then I'll pass that name to flac's "-o" parameter. > > Why reinvent the wheel? abcde is a shell script that does this and much > more. It uses whichever ripper, encoder etc. that you want, with whatever > options you want. I like to putter around with bash scripts. I've written up a 146-line script (83 lines of script plus 63 lines of comments) that handles things to *MY* specs for *MY* needs. It processes .inf and .wav files in a directory, creating flac files in a flac subdirectory. I haven't tested it under all conditions, but it tries to handle... * Check for a "flac" subdirectory; create one if it doesn't already exist * If "Tracktitle" field is empty, bail out. * If "Tracktitle" field contains a slash ("/"), assume that the artist's name is to the left of the slash, and the song name is on the right side of the slash. * If "Tracktitle" field is non-empty, but doesn't contain a "/", assume that it only has the title. - Get the artist name from the "Performer" field. - If "Performer" field is empty, use "Albumperformer" field. - If both are empty, set artist name to "Unknown". * The flac files are created in the "flac" subdirectory -- Walter Dnes I don't run "desktop environments"; I run useful applications