yaret-2.1.0.orig/0000755000175000017500000000000007703211742014646 5ustar mnenciamnencia00000000000000yaret-2.1.0.orig/TODO0000644000175000017500000000315607650022143015337 0ustar mnenciamnencia00000000000000Last updated: February 14, 2002 (*) Items with an asterisk are still outstanding. December 3, 2002 Adam Luter Add an option to allow some sort of filters on the options passed to the encoder. Primarily to remove spaces and other "nasty" characters. 04/12/2003 - Done, output_trans (note this affects both the output filenames -and- the output tagnames). 04/18/2003 - Now only affects filenames, and not tagnames. February 25, 2002 Adam Luter Need to modify --cddb_file option to read the same format file as --cddb_out and --cddb_dump (code to read is written) 03/11/2002 - Done, but perhaps add an option to allow the --cddb_file's information to be exclusive of anything other than other --cddb_file's and/or --global's (that is, not include anything gotten from the CD). * Need an option to take a directory with wavs and treat it as the the output of cdparanoia -B February 16, 2002 Adam Luter * More error checking needed: return values from system calls, etc. Sanity checks on arguments passed: * 1) Requested encoder, ripper or normalizer exists in the path * 2) Ensure you cannot select the same encoder (etc.) twice * No streaming option written (need it?) * "edit cddb information" while ripping * The temp directory does not always clear February 30, 2000 Adam Luter (Example entry) * This is an example todo item that is outstanding This example is no longer outstanding 02/31/2000 - And this is when it was completed This is a second example, except it was not completed by the submiter 02/31/2000 - I finished it! [Brother Fanagin] yaret-2.1.0.orig/contrib/0000755000175000017500000000000007671671271016321 5ustar mnenciamnencia00000000000000yaret-2.1.0.orig/contrib/oggdec_vorbiscomment_cushion.pl0000755000175000017500000000202207671671271024604 0ustar mnenciamnencia00000000000000#!/usr/bin/perl # This cushion helps oggdec out because it's command-line tagging options do not like # funky characters (such as the 'æ' ("ae") character). However vorbiscomment -does- # work, if given the -R switch. Both tools default to replacing your funky characters # with a '#' (pound) character. # # You need a line in your ~/.yaretrc file like this: # command my_ogg="oggdec_vorbiscomment_cushion.pl FILE_IN FILE_OUT QUALITY TRACK ALBUM TRACKNUM ARTIST GENRE YEAR" if( @ARGV != 9 ) { print "You must specify all of the fields in this order to run this command:\n\n"; print "input_filename, output_filename, quality, track, album, track_number,\n"; print "artist, genre and year.\n"; exit 1; } ($fin, $fout, $qual, $track, $album, $tracknum, $artist, $genre, $year) = @ARGV; system "oggenc", "-q", $qual, "-o", $fout, $fin; unless ($?) { $fout =~ s/\'/\'\\\'\'/g; system "vorbiscomment -R -w '$fout' < # and by Adam Luter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. use strict; $|++; my $ver = "2.1.0 (Jul 10, 2003)"; ######################################## # Required Modules use AppConfig qw(:expand :argcount); # Debian packages: libappconfig-perl use Audio::CD; # Use CPAN module (perl -MCPAN -eshell) # also install Debian packages: libcdaudio0 libcdaudio0-dev # The remaining seem to be installed by default: use POSIX qw(:sys_wait_h); use File::Temp qw(tempfile); use Fcntl qw(F_SETFD); use File::Path; ######################################## # Optional Modules (Loaded later) # use Term::ANSIColor; # --color # use Data::Dumper; # --option_only ######################################## # Configuration # You may find documentation for the structure and meaning of the following # sections from theses man pages: # AppConfig(3pm), AppConfig::State(3pm), AppConfig::File(3pm) my %config_initial = ( CASE=>0, # no case-sensitivity CREATE=>0, # no auto creation of undefined variables PEDANTIC=>0, # don't exit on errors # ERROR=>\&???, # use the default GLOBAL=>{ DEFAULT=>undef, ARGCOUNT=>ARGCOUNT_NONE, EXPAND=>EXPAND_ALL, # VALIDATE=>\&???, # use the default # ACTION=>\&???, # use the default } ); # You may use either the short form or the long form here my @config_definitions = ( ## General ## ["help|h|?"], ["version|v"], ["option_only"], # only process options then exit ["include|conf_file|f=s@"], # include additional configuration files ["cddb_file=s@"], # pre-specify cddb information ["max_fork=i", {DEFAULT=>2} ], ["size_order!", {DEFAULT=>1} ], ## Display ## ["display_date|date!", {DEFAULT=>1} ], # print starting and ending dates ["display_color|color!", {DEFAULT=>1} ], ["display_clear|clear!", {DEFAULT=>1} ], ["display_alarm|alarm!", {DEFAULT=>1} ], ["display_quiet|quiet!"], ## Root Paths ## ["root_final=s", {DEFAULT=>"~/music"} ], ["root_work=s", {DEFAULT=>"~/tmp"} ], ## Final Output Pattern ## ["output_name=s", {DEFAULT=>"ARTIST-TRACK_NUM-TRACK.mp3"} ], ["output_path=s", {DEFAULT=>"ENCODER/ARTIST/ALBUM"} ], ["output_track_num_format=s", {DEFAULT=>"%02d"} ], ["output_trans=s", {DEFAULT=>"s/[^a-zA-Z0-9-]+/_/g"} ], ## Album/Track CDDB Attributes ## # global specifies a album global setting, e.g. "global YEAR=1990" ["cddb_global|global=s%"], # track specifies an individual entry, e.g. "track 1=TRACK=Hello City ARTIST=Bare Naked Ladies" ["cddb_track|track=s%"], ["cddb_dump=s"], ["cddb_out=s", {DEFAULT=>"ARTIST-ALBUM.info"} ], ["cddb_confirm|confirm!", {DEFAULT=>1} ], ## Ripper ## # ripper program to use, e.g. "ripper cdparanoia", may only use one ["ripper_use|ripper|r=s"], ["ripper_command=s%"], # defaults specified later due to bug (?) ["ripper_device|device|d=s", {DEFAULT=>"/dev/cdrom"} ], ["ripper_skip|skip=s@"], # which tracks to skip ["ripper_auto_skip|auto_skip:s", {DEFAULT=>60} ], ["ripper_eject|eject!", {DEFAULT=>1} ], ["ripper_min_space|min_space=i", {DEFAULT=>0} ], ["ripper_nice:i", {DEFAULT=>0} ], ## Normalize ## # which normalize program to use, e.g. "normalize normalize", may only use one ["normalize_use|normalize=s"], ["normalize_type=s%"], # normalize track or album at a time ["normalize_command=s%"], # defaults specified later due to bug (?) ["normalize_nice:i", {DEFAULT=>0} ], ## Encoder ## # encoder program(s) to use, e.g. "encoder lame \n encoder bladeenc" ["encoder_use|encoder|e=s@"], # encoder program(s) to use ["encoder_command=s%"], # defaults specified later due to bug (?) ["encoder_bitrate|bitrate=i%"], ["encoder_quality|quality=f%"], ["encoder_extension|extension=s%"], ["encoder_nice:i", {DEFAULT=>10} ], ); my $config = AppConfig->new(\%config_initial); for my $x (@config_definitions) { $config->define(@$x); } sub config_validate { my ($var, $val) = @_; # not used for any options return 1; } sub config_action { our ($state, $var, $val) = @_; # this helper function can be used to make sure only one option of two is on # (like a toggle switch) sub config_set_exclusive { my ($opt1, $opt2) = @_; $state->set($opt1, 0) if $var eq $opt2 and $val == 1 and $state->get($opt1); $state->set($opt2, 0) if $var eq $opt1 and $val == 1 and $state->get($opt2); } # not used for any options } # for some reason the DEFAULT option does not work for ARGCOUNT of type HASH and LIST my %config_default = ( ripper_command=>[ "cdparanoia=cdparanoia -z -d CD_DEV TRACK_NUM FILE_OUT", "cddawav=cddawav -z -H -P 1 -t -D CD_DEV TRACK_NUM FILE_OUT", ], normalize_command=>[ "normalize_album=normalize -b -q FILE_LIST", "normalize_track=normalize -q FILE_LIST", "no_normalize=NOOP", ], normalize_type=>[ "normalize_album=ALBUM", "normalize_track=TRACK", "no_normalize=TRACK", ], encoder_command=>[ "wav=NOOP", "lame=lame --quiet -q QUALITY -t -p -b BIT_RATE -m j --tt TRACK --ta ARTIST --tl ALBUM --ty YEAR --tg GENRE --tn TRACK_NUM FILE_IN FILE_OUT", "bladeenc=bladeenc -crc -q -quiet -BIT_RATE FILE_IN FILE_OUT", "oggenc=oggenc -q QUALITY -o FILE_OUT -d YEAR -N TRACK_NUM -t TRACK -l ALBUM -a ARTIST -G GENRE FILE_IN", "flac=flac -o FILE_OUT -QUALITY FILE_IN", ], encoder_bitrate=>[ "lame=128", "bladeenc=128", ], encoder_quality=>[ "lame=5", "oggenc=3", "flac=5", ], encoder_extension=>[ "wav=.wav", "lame=.mp3", "bladeenc=.mp3", "oggenc=.ogg", "flac=.flac", ], ); while (my ($k, $v) = each %config_default) { $config->set($k,$_) for @$v; } sub load_all_config { our %done = (); sub load_config_file { my @todo = @_; while (my $file = shift @todo) { unless (exists $done{$file}) { $config->file($file); $done{$file} = 1; my $new = $config->conf_file(); push @todo, @$new } } } my $yaretrc = "$ENV{HOME}/.yaretrc"; if (-r $yaretrc) { load_config_file $yaretrc; } else { # please note, no color on this warning, because we have not loaded Term::ANSIColor warn "Perhaps you'd like to make a $yaretrc file to remove this warning (or make it readable)"; } load_config_file @{$config->conf_file()}; $config->getopt; load_config_file @{$config->conf_file()}; } load_all_config; if ($config->help) { print < and Marco Nenciarini Usage: yaret [options] yaret [--help|--version|--option_only] Options are: ============================================================================= [General] -h, --help Display this help (also -?) -v, --version Display the version --option_only Display configuration data -f, --include= Include this file as configuration data (in addition to ~/.yaretrc and any command line options) (also --conf_file) --cddb_file= Include this CDDB information in addition to that obtained from the CDDB query (in same format as both --cddb_dump and --cddb_out produce) --max_fork= Maximum number of normalizers and encoders forked (per type) --size_order Sorts tracks in order of size, completing smaller ones first. [Display] --date Display the start/end times --color Use color --alarm Send beeps when completed --clear Clear the screen --quiet Do not display anything except errors [Paths and Filenames] --root_final= Where to place the results --root_work= Where to work on the results --output_name= How to name the final file --output_path= Path under root_final to place file --output_track_num_format\ Specifies a printf format for the = track numbering, e.g. "%02d" --output_trans= Specifies a regular expression that effects the output of what filename is generated, e.g. "tr/ /_/" [CDDB Overrides] --global=== e.g. ARTIST=Bare Naked Ladies (Make sure to use escapes or quotes) (also --cddb_global) --track==\ e.g. 14=TRACK=Alone ARTIST=Heart =[= ]* (Make sure to use escapes or quotes) --cddb_dump= Dump cddb information to then exit (no editing, encoding, etc.) --cddb_out= After the entire process is completed, output the cddb information to . This filename works with the same pattern rules as the other output files, however some keyword may may not be available. The information saved will reflect any editing. --confirm Confirm cddb information (also --cddb_confirm) Use --noconfirm to turn off. [Ripper] -r, --ripper=