mp3roaster-0.3.0/0000755000175000017500000000000010354606331011720 5ustar eimeimmp3roaster-0.3.0/Makefile0000644000175000017500000000546010354603604013365 0ustar eimeim# # MP3Roaster Makefile # # $Id: Makefile,v 1.16 2005/12/28 21:45:40 eim Exp $ # # This Makefile allows to install MP3Roaster system wide, this way MP3roaster # can be used by all user of our system with personal configuration files in # their respective home directories. # CFG_CVS_REVISION = \$$Revision: 1.16 $ BINPATH = /usr/local/bin MANPATH = /usr/local/share/man DOCPATH = /usr/local/share/doc ETCPATH = /etc all: @echo "MP3Roaster Makefile, $(CFG_CVS_REVISION)" @echo @echo " . Type \"% make install\", to install MP3Roaster." @echo " . Type \"% make uninstall\", to uninstall MP3Roaster." @echo @echo "This Makefile will install MP3Roaster system wide." @echo "Read the MP3roaster man page or perldoc \`which mp3roaster\` once installed." @echo install: @echo @echo "INSTALLING MP3Roaster" @echo "=====================" @echo @echo "This procedure will install MP3Roaster." @echo # EXECUTABLES @echo -n -e "\t* Installing binaries .............. " @install -D mp3roaster $(BINPATH)/mp3roaster @echo "done." # MAN PAGES @echo -n -e "\t* Installing manual ................ " @install -D -m 0644 mp3roaster.1.gz $(MANPATH)/man1/mp3roaster.1.gz @echo "done." # DOCUMENTS @echo -n -e "\t* Installing documentation ......... " @install -d $(DOCPATH)/mp3roaster @install -m 0644 COPYING $(DOCPATH)/mp3roaster @install -m 0644 ChangeLog $(DOCPATH)/mp3roaster @install -m 0644 README $(DOCPATH)/mp3roaster @echo "done." # /ETC CONFIGURATIONS @echo -n -e "\t* Installing configuration ......... " @install -d $(ETCPATH)/mp3roaster @install -m 0644 mp3roasterrc $(ETCPATH)/mp3roaster @echo "done." @echo @echo "Installed successfully." @echo uninstall: @echo @echo "UNINSTALLING MP3Roaster" @echo "=======================" @echo @echo "This procedure will completely remove MP3Roaster from your system." @echo "Only MP3Roaster user configurations in the home directories will remain." @echo # EXECUTABLES @echo -n -e "\t* Removing binaries .............. " @rm $(BINPATH)/mp3roaster @echo "done." # MAN PAGES @echo -n -e "\t* Removing manual ................ " @rm $(MANPATH)/man1/mp3roaster.1.gz @echo "done." # DOCUMENTS @echo -n -e "\t* Removing documentation ......... " @rm -r $(DOCPATH)/mp3roaster @echo "done." # /ETC CONFIGURATIONS @echo -n -e "\t* Removing configuration ......... " @rm -r $(ETCPATH)/mp3roaster @echo "done." @echo @echo "Uninstalled successfully." @echo changelog: echo -e "#\n# \$$Id: Makefile,v 1.16 2005/12/28 21:45:40 eim Exp $$\n#\n" | cvs2cl -T -t -w -r --fsf -U Developers --header - && rm ChangeLog.bak cvs commit -m "The ChangeLog has been updated." ChangeLog cvs_update: cvs update -P man: rm -f mp3roaster.1 mp3roaster.1.gz pod2man mp3roaster mp3roaster.1 gzip mp3roaster.1 cvs commit -m "The MAN page has been updated." mp3roaster.1.gz mp3roaster-0.3.0/README0000644000175000017500000001051410322221142012565 0ustar eimeim# # MP3Roaster README # # $Id: README,v 1.7 2005/10/09 14:00:02 eim Exp $ # 0. Index -------- 0. Index 1. Introduction 2. About MP3Roaster 3. Why I've started this project 4. MP3Roaster configuration 5. MP3Roaster configuration options 6. Usage syntax 7. Additional help 8. How to contribute 1. Introduction --------------- Welcome to the MP3Roaster README file. In this README file I explain what MP3Roaster is, why I've started this project and why it could be useful for you and last but not least some informations on how you can be involved in the MP3Roaster development process, have fun reading! 2. About MP3Roaster ------------------- MP3Roaster is a Perl hack for burning audio CDs out of MP3, OGG Vorbis FLAC and WAV files. The main highlights of this application are an easy to use command line syntax and automatic volume leveling support for best audio CD quality. 3. Why I've started this project -------------------------------- The answer is quite simple and I think it's also the main reason why most people out there start new Open Source projects every day: the fun to code. Well, I was searching for an user friendly application to create audio CD out of MP3 files but all the programs I've found, both GUI and text oriented, were not able to satisfy my needs so I decided to write my own application. Of course MP3Roaster is just one solution to create your audio CD, there are many other good projects out there which aim to the same objective, this program is my attempt to suite my needs, if you like it, use it, simple ;) 4. MP3Roaster configuration --------------------------- MP3Roaster can be configured through a system wide and a personal configuration file. When you run MP3Roaster it will first check for your personal configuration file in your home directory, if no one is found it will fall-back to the system wide configuration files placed in /etc. By default MP3Roaster installs the configuration files in /etc/mp3roaster, but there are other possible file locations for the configuration file: . System wide configuration in /etc . /etc/mp3roaster/mp3roasterrc (DEFAULT) . /etc/mp3roasterrc . Personal configuration in your home . ~/.mp3roaster/mp3roasterrc . ~/.mp3roasterrc So if you want to have personal MP3Roaster configuration file just copy the system wide configuration file to your home directory and edit it. 5. MP3Roaster configuration options ----------------------------------- All configuration options are explained in the system wide example configuration file. 6. Usage syntax --------------- Once correctly configured MP3Roaster is very easy to use, just launch it from the command line with a bunch of compressed audio files, here is a short example: % mp3roaster "Root Dance.mp3" Free\ Software.flac bar.ogg Decoded.wav This will burn Root\ Dance.mp3, Free\ Software.flac bar.ogg and Decoded.wav on your audio CD preserving the song order as specified on the command line. Here is another example showing the usage of command line options like the dummy option: % mp3roaster -d "Root Dance.mp3" Free\ Software.flac bar.ogg Decoded.wav This will do the same job as above but with the laser of your CD writer turned off, so no data will be really written. You see MP3Roaster is really easy to use, this was one of my main goals while I've written the code: Keep it simple ;) 7. Additional help ------------------ Additional help to MP3Roaster can be found on the project web page which is available on http://mp3roaster.sourceforge.net or in the projects users mailing list mp3roaster-users@lists.sourceforge.net 8. How to contribute -------------------- If you are interested in contributing to the project you can get in contact with the MP3Roaster developers using the devel mailing list available at mp3roaster-devel@lists.sourceforge.net If you would like to get in contact with other MP3Roaster users please use the mp3roaster-users@lists.sourceforge.net mailing list, of course you will also find MP3Roaster developers on this mailing list. Feel free to submit any kind of development related informations like patches, bug fixes, improvements or just comments and suggestion, we will look forward to reply as soon as possible, thank you. mp3roaster-0.3.0/Developers0000644000175000017500000000032210320175761013751 0ustar eimeim# # MP3Roaster developers (Active on the CVS code) # # $Id: Developers,v 1.2 2005/10/03 09:37:53 eim Exp $ # eim:Ivo Marino lorenzo1:Lorenzo Taylor mp3roaster-0.3.0/mp3roasterrc0000644000175000017500000000475510354567021014304 0ustar eimeim# # MP3Roaster example configuration file # # $Id: mp3roasterrc,v 1.11 2005/12/28 19:57:05 eim Exp $ # # You can copy this file to ~/.mp3roaster/mp3roasterrc or to ~/.mp3roasterrc and # adapt it to your needs, all variables which are listed here can also be passed # via CLI options to mp3roaster. # # # CDR DEV # # Configure here the SCSI ID target of your CD/RW recorder, you can execute # % cdrecord -scanbus to scan the SCSI bus and find the ID of your CD/RW # recorder. # # If you have an IDE CDR or CD/RW writer and you are running Linux kernel >= 2.6 # you can specify directly your CDR or CD/RW recorder device by it's name on the # /dev file system, e.g. /dev/cdrom, /dev/hdc, etc. # $config_cdr_dev = "/dev/cdrom"; # # CDR SPEED # # Configure here the burn speed supported by your CD/RW recorder, if you don't # know the maximum compatible burning speed of your CD/RW recorder I suggest to # use 4 as burning speed value. Use -1 to let choose cdrecord. # $config_cdr_speed = -1; # # CDR DUMMY # # With this option you can enable or disable the cdrecord dummy mode, when dummy # mode is enabled (option set to 1) cdrecord will perform all operations with # laser turned off, I've added this option for testing purposes so leave it # disabled in doubt. # $config_cdr_dummy = 0; # # CDR DAO # # Use this option to record a CD in disk-at-once mode. # This allows live CD tracks to be burned with no gaps between them. # $config_cdr_dao = 0; # # CDR BURNFREE # # Configure here whether you want your drive to use burnfree technology to # prevent buffer underruns. # $config_cdr_burnfree = 1; # # TEMP DIR # # Configure here the temporary directory to use by MP3Roaster, this directory # will hold all uncompressed WAV files during the burning process so it should # be big enough to hold all the songs for your audio CD, after successful burning # all the WAV files in this directory will be removed. # $config_temp_dir = "/tmp/wav"; # # MP3 DECODER # # Choose your favorite mp3 decoder: mpg321 or mpg123. # $config_mp3_decoder = "mpg321"; # # CHECK FILES # # Here you can enable or disable the check files tasks. # $config_check_lowercase = 0; $config_check_spaces = 0; $config_check_brackets = 0; $config_check_quotes = 0; $config_check_questions = 0; # # WAV NORMALIZE # # Enable or disable the wav normalizing support, when this option is enabled (1) # then all the wav files will be normalized to the same audio level, in order to # do this you need normalize installed on your system. # $config_wav_normalize = 1; mp3roaster-0.3.0/INSTALL0000644000175000017500000001112510322221570012742 0ustar eimeim# # MP3Roaster INSTALL # # $Id: INSTALL,v 1.7 2005/10/09 14:04:40 eim Exp $ # 0. Index -------- 0. Index 1. Introduction 2. Requirements 3. Install MP3Roaster 4. Uninstall MP3Roaster 1. Introduction --------------- In this file I will cover some basic instruction on how to install MP3Roaster on your system. Both installing and uninstalling the software should be quite easy and work on most UNIX like environments. MP3Roaster has been developed and tested on both Debian GNU/Linux and Red Hat (Fedora) Linux, all dependencies to run MP3Roaster are available for this GNU/Linux distributions. 2. Requirements --------------- Here is a list of software dependencies of MP3Roaster, in poor words you need the free software listed below in order to run MP3Roaster on your box. . Perl Perl 5.6 or above (tested with 5.8) . Term::ReadKey Module for simple terminal control . File::MMagic Perl library to Guess file type . MPEG::MP3Info Perl library Manipulate / fetch info from MP3 audio files . Ogg::Vorbis::Header Perl extension for Ogg Vorbis streams . Audio::FLAC::Header Perl extension for FLAC files . Audio::Wav Perl extension for WAV files . cdrecord A command line CD writing tool . mpg321 or mpg123 A Free command-line mp3 player . ogg123 Plays Ogg Vorbis files . flac Decodes FLAC files Furthermore I suggest to install: . normalize Adjust the volume of WAV files to a standard volume level In order to install MP3Roaster from source and not as a Debian package you will also need this package: . GNU make The GNU version of the "make" utility. Here is a table of required Perl libraries and it's relative package names for various GNU/Linux distributions, if you can provide further infos to complete this table please drop us a line, thank you. +---------------------+---------------------------+------------------------+-----------------+ | Perl library | Debian GNU/Linux | Red Hat Linux | Slackware Linux | +---------------------+---------------------------+------------------------+-----------------+ | Term::ReadKey | libterm-readkey-perl | perl-TermReadKey | Unknown | | File::MMagic | libfile-mmagic-perl | perl-File-MMagic | Unknown | | MPEG::MP3Info | libmp3-info-perl | perl-MP3-Info | Unknown | | Ogg::Vorbis::Header | libogg-vorbis-header-perl | perl-Ogg-Vorbis-header | Not available | | Audio::FLAC::Header | libaudio-flac-header-perl | perl-Audio-FLAC-header | Unknown | | Audio::Wav | libaudio-wav-perl | perl-Audio-Wav | Unknown | +---------------------+---------------------------+------------------------+-----------------+ Red Hat Linux packages note: All Red Hat packages listed in the above table are currently available from ftp://prince.homelinux.org/software Debian GNU/Linux packages note: All the above listed packages are available in Debian GNU/Linux unstable. 3. Install MP3Roaster --------------------- Once ensured that you have installed all the required software to run MP3Roaster and once download the latest source package or the CVS version of MP3Roaster you can proceed with this steps: 1. Untar the MP3Roaster source package if downloaded as package: (If you have checked out the CVS source skip this step) % tar xfvz mp3roaster-.tar.gz 2. Move to the decompressed source folder and as root run: % cd mp3roaster- Go to the source % su - Become root with su % make install Launch installation That's it, now MP3Roaster is installed system wide on your box, this means that all users of your system can use it. Do not remove the MP3Roaster source directory because you will need it to eventually uninstall the software, see "Uninstall MP3Roaster" for details. 4. Uninstall MP3Roaster ----------------------- Uninstalling MP3Roaster is as easy as installing it. Here are described the two simple steps for uninstalling the software: % cd mp3roaster- Go to the source % su - Become root with su % make uninstall Launch uninstall That's it, now MP3Roaster is completely removed from your computer. Now you can delete also the MP3Roaster source directory. mp3roaster-0.3.0/mp3roaster0000755000175000017500000011564510322171765013764 0ustar eimeim#!/usr/bin/perl -w # # $Id: mp3roaster,v 1.22 2005/10/09 09:27:57 eim Exp $ # # TODO: # # . Define and complete verbose/debug options mode. # . Fix the clear line code (x75, see perldoc perldop). # . Complete all the little TODO signed comments in the code. # # LICENSE: # # 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. # # For further details take a look at the COPYING file. # use strict; use Getopt::Long; # For the input options use File::Basename; # Get the basename of files use File::Compare; # Compare files use File::Path; # Get file path use File::Copy; # Copy files or filehandles use File::MMagic; # Guess file type use Term::ReadKey; # Module for simple terminal control use MPEG::MP3Info; # Allows to get MP3 infos use Ogg::Vorbis::Header; # Perl extension for Ogg Vorbis streams use Audio::FLAC::Header; # Perl extension for FLAC files use Audio::Wav # Perl extension for wav files Getopt::Long::Configure("no_auto_abbrev", "no_ignorecase"); # # DECLARE GLOBAL VARS # my $config_file_dir = "mp3roaster"; my $config_file_name = "mp3roasterrc"; my %opthash; # # GET OPTIONS # GetOptions ( \%opthash, 'opt_cdr_dev|dev|D=s', 'opt_cdr_speed|speed|s=i', 'opt_cdr_dummy|dummy|d', 'opt_cdr_dao|dao|a', 'opt_cdr_burnfree|burnfree|b', 'opt_temp_dir|temp|t=s', 'opt_mp3_decoder|mp3dec|m=s', 'opt_check_lowercase|lowercase|l', 'opt_check_spaces|spaces|S', 'opt_check_brackets|brackets|B', 'opt_check_quotes|quotes|q', 'opt_check_questions|questions|Q', 'opt_wav_normalize|normalize|n', 'verbose|v', 'help|h', 'version|V' ); # {{{ sub showHelp{} # # showHelp # # Print the help (usage) screen. # sub showHelp { my ($def_appname, $def_description, $def_bug_contact) = @_; print <. with lots of help from $def_co_author <$def_co_author_email>. Copyright (C) $def_copyright_time $def_author <$def_author_email> This is free software; see the source for copying conditions. There is NO warranty; the author is NOT RESPONSIBLE for any use of this program. EOH }; # }}} # {{{ sub print_error{} # # print_error # # Compose and return an error message. # sub print_error { my ($in_sub, $in_r_message) = @_; if (defined $in_sub) { return " \! ERROR in sub $in_sub\n $in_r_message\n\n"; } else { return " \! ERROR: $in_r_message\n\n"; } } # }}} # {{{ sub which_config_file{} # # which_config_file # # This function checks for a configuration file. # If this file exists and is not world writable # the function returns it's location path as string. # # If the configuration file is world writable we # print out an error message and die. # # If no configuration is available we return undef. # sub which_config_file { my ($in_file_dir, $in_file_name) = @_; # directory and file my $sub = "WHICH_CONFIG_FILE"; # subroutine name my $location; my @location_array = ( "$ENV{'HOME'}/.$in_file_name", # ~/ -> . "$ENV{'HOME'}/.$in_file_dir/$in_file_name", # ~/ -> /. -> "/etc/$in_file_name", # /etc -> "/etc/$in_file_dir/$in_file_name" # /etc -> / -> ); foreach $location (@location_array) { # if file available if (-r $location) { # if config file is world writable if ((stat($location))[2] & 02) { # print error and die die print_error ($sub, "$location should not be world-writable"); } return $location; } } return undef; } # }}} # {{{ sub read_config_file_and_options{} # # read_config_file_and_options # # This function reads the configuration file # and returns a HASH with all configurations. # sub read_config_file_and_options { my ($in_config_file_location) = @_; # config file path my $sub = "READ_CONFIG_FILE_AND_OPTIONS"; # subroutine name my $oldRS; # file holder my $rc; # file holder my $reference; my %confhash; my %refhash; # This variables are found in the configuration file and # need to be declared here in order to follow `use strict` my $config_cdr_dev; my $config_cdr_speed; my $config_cdr_dummy; my $config_cdr_dao; my $config_cdr_burnfree; my $config_temp_dir; my $config_mp3_decoder; my $config_check_lowercase; my $config_check_spaces; my $config_check_brackets; my $config_check_quotes; my $config_check_questions; my $config_wav_normalize; # This options MUST be defined in the configuration file # or MUST be passed to the program as a command line option %refhash = ( "config_cdr_dev" => \$config_cdr_dev, "config_cdr_speed" => \$config_cdr_speed, "config_cdr_dummy" => \$config_cdr_dummy, "config_cdr_dao" => \$config_cdr_dao, "config_cdr_burnfree" => \$config_cdr_burnfree, "config_temp_dir" => \$config_temp_dir, "config_mp3_decoder" => \$config_mp3_decoder, "config_check_lowercase" => \$config_check_lowercase, "config_check_spaces" => \$config_check_spaces, "config_check_brackets" => \$config_check_brackets, "config_check_quotes" => \$config_check_quotes, "config_check_questions" => \$config_check_questions, "config_wav_normalize" => \$config_wav_normalize ); open('RC', $in_config_file_location); # open file $oldRS = $/; undef $/; $rc = ; close('RC'); # close file unless(defined eval $rc) { # read data and check syntax die print_error($sub, "Found a syntax error in $in_config_file_location:\n $@"); } $/ = $oldRS; # # Procedure... # # 1. Check if option was given # 2. Check if config var was given # 3. Error # # cycle all config variable names foreach $reference (keys %refhash) { # $$foo holds the values from the config file my $foo = $refhash{$reference}; # print "FOO: $$foo\n"; # create option variable names my $reference2 = $reference; $reference2 =~ s/config/opt/i; # if option variable for `variable name` available if (defined $opthash{$reference2}) { $confhash{$reference} = $opthash{$reference2}; if ($opthash{verbose}) { print " OPTS: $reference2 => $opthash{$reference2}\n"; } # if config variable for `variable name` available } elsif (defined $$foo) { # # Return error if only blank spaces where defined for an option # in the configuration file, e.g.: $config_cdr_dev = " ", this is # different from $config_cdr_dev = "" which will be stooped later # # TODO Add a regexp function which checks for one or more spaces # or remove this option an let the functions check the values # if ($$foo eq " ") { die print_error($sub, "Just a blank value is set for option \"\$$reference\" in the\n configuration file, you need to fix your configuration file now\n or provide a correct value via the respective command line option."); } else { $confhash{$reference} = $$foo; if ($opthash{verbose}) { print " CONF: $reference => $confhash{$reference}\n"; } } # if variable was not defined anywhere } else { $reference =~ s/config_//i; die print_error($sub, "Option \"$reference\" was neither defined in the configuration file\n and neither as an option, please define this value somewhere."); } }; return %confhash; } # }}} # {{{ sub fetch_file_array{} # # fetch_file_array # # This function checks if the file specified via # ARGV exists and is a valid MP3 or OGG file via # the check_file_type function. # # If the file is valid it will be copied to the # files_array which will be returned by this function. # # This function can only return a good value in all bad # cases it calls the print_error function and dies. # sub fetch_file_array { my $sub = "FETCH_FILE_ARRAY"; # subroutine name my @file_array; # the file array my $i = 0; # a simple counter foreach my $file (@ARGV) { if (-r $file) { if (defined check_file_type($file)) { $file_array[$i] = $file; $i++; } else { die print_error ($sub, "The file \"$file\" is not a valid MP3, OGG or FLAC file."); } } else { die print_error ($sub, "The file \"$file\" does not exist."); } } return @file_array; } # }}} # {{{ sub fetch_atip_time{} # # fetch_atip_time # # This function fetches the ATIP of the CD/RW Disc. # We use the cdrecord application to get this infos. # # We return the ATIP time in seconds. # sub fetch_atip_time { my ($config_cdr_dev) = @_; my $sub = "FETCH_ATIP_TIME"; my $atip_sec; my $atip_min; my $atip_time; if (!$config_cdr_dev) { my $r_message = "You must specify the CDR/W drive id in the configuration file or with\n the option --drive x.y.z. Execute: % cdrecord \-scanbus for further details."; die print_error($sub, $r_message); } # open file and use "cdrecord -atip" to fetch ATIP info open(CDINFO,"cdrecord -atip dev=".$config_cdr_dev." 2>&1 |"); while () { # fetch until timeout next unless (/out:.+\((\d+):(\d+)/); # get the time vars $atip_min = $1; $atip_sec = $2; } close CDINFO; # die if no CDR in Drive unless ($atip_sec && $atip_min) { my $r_message = "No CD-R/W in the CDR/W writer."; die print_error ($sub, $r_message); } # # Print out the ATIP time # TODO : This should be printed out in verbose mode. # # printf " * %d:%.2d minutes available on CDR/W.\n",$atip_min,$atip_sec; # compose ATIP time in secs $atip_time = ($atip_min * 60) + $atip_sec; return $atip_time; } # }}} # {{{ sub check_file_type{} # # check_file_type # # This function returns the extension of a file # or undef if the file is not valid. # sub check_file_type { my ($file) = @_; my $sub = "CHECK_FILE_TYPE"; my $ext; my $mm = new File::MMagic; my $fh = new FileHandle "< $file"; my $res = $mm->checktype_filehandle($fh); # # Secrets of File::MMagic, this works only on Debian... # # if ($res eq "application/octet-stream"), we need to add # if ($res eq "audio/mpeg"), for Red Hat and maybe also some other distro. # if ($res eq "application/octet-stream" || "audio/x-wav" || "audio/mpeg") { $ext = (split(/\./,$file))[-1]; if ($ext eq "wav"||"mp3"||"ogg"||"flac") { return $ext; } } return undef; } # }}} # {{{ sub check_file{} # # check_file # # This function checks the filename of each $file # in the @file_array using a specified syntax command, # this command is passed to the functions as parameter. # sub check_file { my ($config_check_lowercase, $config_check_spaces, $config_check_brackets, $config_check_quotes, $config_check_questions, @file_array) = @_; my $sub = "CHECK_FILE"; # subroutine name # Browse through the MP3 Array foreach my $file (@file_array) { # Make copy of actual file my $file_tmp = $file; if ($config_check_lowercase) { # Lowercase in $file_tmp $file_tmp =~ tr/A-Z/a-z/; } if ($config_check_spaces) { # Remove spaces in $file_tmp $file_tmp =~ tr/" "/"_"/; } if ($config_check_brackets) { # Remove brackets in $file_tmp $file_tmp =~ tr/"("/"_"/; $file_tmp =~ tr/")"/"_"/; } if ($config_check_quotes) { # Remove quotes in $file_tmp $file_tmp =~ tr/"'"/"_"/; $file_tmp =~ tr/'"'/"_"/; } if ($config_check_questions) { # Remove questionmarks in $file_tmp $file_tmp =~ tr/"?"/"_"/; } # If original MP3 name is different from lowercased copy if ($file_tmp ne $file) { # Check if there's already a file with the lowercased name if (-e $file_tmp) { # If there's already a file which # is the original, the same, rename it. if (compare ("$file", "$file_tmp") == 0) { # Rename the file rename ("$file" , "$file_tmp"); # Update the @file_array $file = $file_tmp; # The File is not the same, big problem ! # die with error message. } else { # # TODO # Solve this extreme error case. # print "\n"; print "Can't Rename $file\n"; print "there is already a $file_tmp named file\n"; print "which is not equal\n"; print "\n"; exit 1; } # If there's no file with the lowercased name } else { # Rename the file rename ("$file" , "$file_tmp"); # Update the @file_array $file = $file_tmp; } } } return @file_array; } # }}} # {{{ sub fetch_file_time{} # # fetch_file_time # # This is a generic function which calculates the # total time of all MP3/OGG/FLAC/WAV files in the @file_array. # # The function calculates also the total fudge factor time # which is the sum of all the seconds between two audio tracks, # I've set it's value to 4 seconds. # # We have four dependences for this function: # # DEPENDENCY MODULE DEBIAN PACKAGE # ------------------------------------------------- # MPEG::MP3Info libmp3-info-perl # Ogg::Vorbis::Header libogg-vorbis-header-perl # Audio::FLAC::Header libaudio-flac-header-perl # Audio::Wav libaudio-wav-perl # sub fetch_file_time { my (@file_array) = @_; my $sub = "FETCH_FILE_TIME"; # subroutine name my $mp3info; # get_mp3info() return my $ogg; # holds the Ogg::Vorbis::Header object my $oggtime; # holds the ogg's length in seconds my $flac; # holds the Audio::FLAC object my $flactime; # holds the flac's length in seconds my $wav; # holds the wav object my $wavtime; # holds the wav's length in seconds my $tot_secs; # sum of all file plus fudge seconds my $tot_min; # calculated file length in minutes my $tot_sec; # calculated file length in seconds my $fudge = "4"; # fudge time value (preference) my $tot_fudge_secs; # sum of all fudge seconds my $tot_fudge_min; # calculated fudge length in minutes my $tot_fudge_sec; # calculated fudge length in seconds # Cycle the file array foreach my $file (@file_array) { # if we treat a WAV file if (check_file_type($file) eq "wav") { # # We use Audio::Wav here to fetch information from the wav file # $wav = new Audio::Wav->read($file); $wavtime = $wav->length_seconds(); $tot_secs += $wavtime + $fudge; # if we treat a MP3 file } elsif (check_file_type($file) eq "mp3") { # Fetch informations about the MP3 file via libmp3-info-perl. $mp3info = get_mp3info($file); # Sum total seconds plus fudge factor $tot_secs += ($mp3info->{MM}*60) + $mp3info->{SS} + $fudge; # if we treat a OGG file } elsif (check_file_type($file) eq "ogg") { # # We use Ogg::Vorbis::Header here # Example: http://search.cpan.org/src/FOOF/libvorbis-perl-0.02/test.pl # $ogg = Ogg::Vorbis::Header->load($file); $oggtime = $ogg->info("length"); $tot_secs += $oggtime + $fudge; # if we treat a FLAC file } elsif (check_file_type($file) eq "flac") { # # We use Audio::FLAC here # $flac = Audio::FLAC::Header->new($file); $flactime = $flac->{trackTotalLengthSeconds}; $tot_secs += $flactime + $fudge; } # Calculating the total fudge factor time $tot_fudge_secs += ($fudge); } # Calculating $tot_min and $tot_sec $tot_min = int $tot_secs/60; $tot_sec = $tot_secs % 60; # Calculating $tot_fudge_min and $tot_fuge_sec $tot_fudge_min = int $tot_fudge_secs/60; $tot_fudge_sec = $tot_fudge_secs % 60; # Compose the MP3 time in secs # $file_time = $tot_secs; # TODO # This should become a verbose option # Print out the file time # printf " * %d:%.2d \(+ %d:%.2d fudge\) minutes of audio.\n", $tot_min, $tot_sec, $tot_fudge_min, $tot_fudge_sec; return $tot_secs; } # }}} # {{{ sub compare_file_atip{} # # compare_file_atip # # This function compares the total time of the MP3/OGG/FLAC/WAV files # with the ATIP time and warns you the songs won't fit on CDR/W. # sub compare_file_atip { my ($in_atip_time, $in_file_time) = @_; my $key; my @fifo; my $in_atip_min = int $in_atip_time/60; my $in_file_min = int $in_file_time/60; # if file time is shorter than ATIP time if ($in_file_time <= $in_atip_time) { print " * The audio files fit on CD\/RW\ (CD: $in_atip_min min / File: $in_file_min min\)\n"; } else { print " * WARNING: The files won\'t fit on CD\/RW \(CD: $in_atip_min min / File: $in_file_min min\)\n"; } print " Do you want to continue? ([Any Key/n]) "; open(TTY,"&-"; # # TODO Finish to implement toolame decoder support. # toolame is available on Debian GNU/Linux and is free. # lame is not free instead so toolame is the case (perhaps). # # } elsif (/toolame/) { # # $cmd = "toolame --decode $file $wavpath"; # } else { die print_error($sub, "Configure a valid mp3 decoder.") } } $rc = system($cmd); if (!$rc) { $wav_array[$i] = $wavpath; $i++; } else { die print_error($sub, "$file was not correctly decoded,\n $config_mp3_decoder error code $rc."); } } else { $wav_array[$i] = $wavpath; $i++; } } elsif ($tmpFileType eq "ogg") { $wavpath =~ s/ogg/wav/i; $wavpath = $config_temp_dir."/".$wavpath; if (!check_for_wav_file($i, $file, $wavpath)) { # # Function system returns the exit code, exec not. # # ogg123 exits with error code 256 if the destination # file already exists, mpg321 does not. # # Here we can also use oggdec which is available, as ogg123, # in the Debian vorbis-tools package. Which one is better? # # % oggdec foo.wav will decode to foo.wav # $cmd = "ogg123 -d wav -f \"$wavpath\" \"$file\" 2>&-"; $rc = system($cmd); if (!$rc) { $wav_array[$i] = $wavpath; $i++; } else { die print_error($sub, "$file was not correctly decoded to $wavpath\n ogg123 error code $rc, try to remove $wavpath if exists."); } } else { $wav_array[$i] = $wavpath; $i++; } } elsif ($tmpFileType eq "flac") { $wavpath =~ s/flac/wav/i; $wavpath = $config_temp_dir."/".$wavpath; if (!check_for_wav_file($i, $file, $wavpath)) { $cmd = "flac -d -s \"$file\" -o \"$wavpath\" 2>&-"; $rc = system($cmd); if (!$rc) { $wav_array[$i] = $wavpath; $i++; } else { die print_error($sub, "$file was not correctly decoded to $wavpath\n flac error code $rc, try to remove $wavpath if exists."); } } else { $wav_array[$i] = $wavpath; $i++; } } } return @wav_array; } # }}} # {{{ sub wav_normalize{} # # wav_normalize # # This function recalls normalize with the -m (mix) # option in order to standardize the max volume level # for all wav files in the temp directory, if execution # is successfully we'll go back to main without any return # value else we die with an error message. # sub wav_normalize { my ($config_temp_dir) = @_; my $sub = "WAV_NORMALIZE"; my $cmd; my $rc; $cmd = "normalize-audio -m $config_temp_dir/*.wav 2>&-"; $rc = system($cmd); if ($rc) { die print_error($sub, "the normalizing process was not successful,\n normalize error code $rc."); } } # }}} # {{{ sub burn{} # # burn # # This function burns all wav files to a CD/RW disc # using the cdrecord application, if cdrecord returns # an error code we print out an error message and die, # else we go back to main without any return value. # sub burn { my ($config_cdr_dev, $config_cdr_speed, $config_cdr_dummy, $config_cdr_dao, $config_cdr_burnfree, @wav_array) = @_; my $sub = "BURN"; my $burn_wav_list; my $cdrecord_options; my $cmd; my $rc; foreach my $wav (@wav_array) { $burn_wav_list = $burn_wav_list." \"$wav\""; } $cdrecord_options = "dev=$config_cdr_dev speed=$config_cdr_speed gracetime=2 -eject -pad -audio -silent"; if ($config_cdr_dummy) { $cdrecord_options = $cdrecord_options." -dummy"; } if ($config_cdr_dao) { $cdrecord_options = $cdrecord_options." -dao"; } else { $cdrecord_options = $cdrecord_options." -tao"; } if ($config_cdr_burnfree) { $cdrecord_options = $cdrecord_options." driveropts=burnfree"; } # Let's burn folks -- Finally! $cmd = "cdrecord $cdrecord_options $burn_wav_list >/dev/null 2>&1"; $rc = system($cmd); if ($rc) { die print_error($sub, "the burn process was not successful,\n cdrecord error code $rc."); } } # }}} # {{{ sub flush_temp{} # # flush_temp # # This Function removes all wav files of the WAV array # from the temporary directory and returns the summarized # number of all removed files. The temporary directory # itself won't be remove because user could have set it # to something like / which is anyway quite lame. # sub flush_temp { my (@wav_array) = @_; my $i = 0; foreach my $wav (@wav_array) { unlink($wav); $i++; } return $i; } # }}} # {{{ main{} # # main # sub main { # {{{ %def my %def = ( 'appname' => 'mp3roaster', 'realname' => 'MP3Roaster', 'description' => 'A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAVs', 'cvs_revision' => '$Revision: 1.22 $', 'version' => '0.3.0', 'bug_contact' => 'eim@users.sourceforge.net', 'author' => 'Ivo Marino', 'author_email' => 'eim@users.sourceforge.net', 'co_author' => 'Lorenzo Taylor', 'co_author_email' => 'lorenzo1@users.sourceforge.net', 'copyright_time' => '2002-2005' ); # }}} my $config_file_location; my %confhash; my @file_array; my @wav_array; if (@ARGV) { print "$def{appname} $def{version} ($def{cvs_revision}).\n\n"; # # 1: check for configuration file # if (defined ($config_file_location = which_config_file($config_file_dir, $config_file_name))) { # # 2: read configuration file and put all vars in a hash # print " * Options [ "; %confhash = read_config_file_and_options($config_file_location); # print "dev ($confhash{config_cdr_dev}) "; print "$confhash{config_cdr_speed}x "; print "dummy " if ($confhash{config_cdr_dummy}); print "dao " if ($confhash{config_cdr_dao}); print "burnfree " if ($confhash{config_cdr_burnfree}); print "lowercase " if ($confhash{config_check_lowercase}); print "spaces " if ($confhash{config_check_spaces}); print "brackets " if ($confhash{config_check_brackets}); print "quotes " if ($confhash{config_check_quotes}); print "questionmarks " if ($confhash{config_check_questions}); print "normalize " if ($confhash{config_wav_normalize}); print "]\n"; # # 3: create the file array # @file_array = fetch_file_array; print " * Processing "; if (($#file_array) > 0) { printf "%d files.\n", $#file_array+1; } else { print "1 file.\n"; } # # 4: check files (optional) # if (($confhash{config_check_lowercase}) || ($confhash{config_check_spaces}) || ($confhash{config_check_brackets}) || ($confhash{config_check_quotes}) || ($confhash{config_check_questions})){ print " * Checking file [ "; @file_array = check_file($confhash{config_check_lowercase}, $confhash{config_check_spaces}, $confhash{config_check_brackets}, $confhash{config_check_quotes}, $confhash{config_check_questions}, @file_array); print "]\n"; } # # 5: check if files fit on CD/RW # compare_file_atip(fetch_atip_time($confhash{config_cdr_dev}), fetch_file_time(@file_array)); # # 6: check the temp directory # if (check_temp($def{appname}, $confhash{config_temp_dir})) { print " * Temporary directory available.\n"; } else { print " * Temporary directory created.\n"; } # # 7: decode MP3/OGG/FLAC files and get the wave array # print " * Decoding MP3/OGG/FLAC files to wav...\n"; @wav_array = file_decode($confhash{config_wav_normalize}, $confhash{config_temp_dir}, $confhash{config_mp3_decoder}, @file_array); # # TODO # clear the line with 80 chars, this could be done much better (x75, see perldoc perldop) # print "\r "; if (($#wav_array) > 0) { printf "\r done, %d files successfully decoded.\n", $#wav_array+1; } else { print "\r done, 1 file successfully decoded.\n"; } # # 8: normalize all the WAV files # if ($confhash{config_wav_normalize}) { print " * Normalizing wav files, please wait... "; wav_normalize($confhash{config_temp_dir}); print "done.\n"; } # # 9: now let's BURN # # TODO Debug this printf.. # # printf " * Burning %d files, please wait... ", ($#wav_array+1); # print " * Burning files, please wait... "; burn($confhash{config_cdr_dev}, $confhash{config_cdr_speed}, $confhash{config_cdr_dummy}, $confhash{config_cdr_dao}, $confhash{config_cdr_burnfree}, @wav_array); print "done.\n"; # # 10: flush all wav files in temporary directory # my $f = flush_temp(@wav_array); if ($f > 1) { printf " * Removed %d wav files.\n\n", $f; } else { print " * Removed 1 wav file.\n\n"; } exit 0; } else { die print_error(undef, "MP3Roaster configuration file is not available."); } } elsif ($opthash{version}) { showVersion($def{appname}, $def{version}, $def{cvs_revision}, $def{author}, $def{author_email}, $def{co_author}, $def{co_author_email}, $def{copyright_time}); } elsif ($#ARGV < 1 || $opthash{help}) { showHelp($def{appname}, $def{description}, $def{bug_contact}); } } # }}} main(); exit 0; __END__ # {{{ PerlDoc =head1 NAME mp3roaster - A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAVs =head1 SYNOPSIS B [OPTION]... C =head1 DESCRIPTION B A Perl hack for burning audio CDs out of MP3, OGG VORBIS and FLAC files. The main highlights of this application are an easy to use command line syntax and automatic volume leveling support for best audio CD quality. =head1 ENVIRONMENT MP3Roaster should run on all Unix like operating systems which have Perl and cdrecord installed. It has been developed on Debian GNU/Linux. =head1 OPTIONS All options have been imported, now we should add specific descriptions for each option. =over 4 =item B<-d, --dev> CDR device to use =item B<-s, --speed> Burn speed =item B<-d, --dummy> Burn with laser off =item B<-a, --dao> Burn in disk-at-once (DAO) mode for gapless recording =item B<-b, --burnfree> Turn on Buffer Underrun Free writing =item B<-t, --temp> Temporary directory =item B<-m, --mp3dec> MP3 decoder to use =item B<-l, --lowercase> Convert filenames to lowercase =item B<-S, --spaces> Replace spaces with underscores =item B<-B, --brackets> Replace brackets with underscores =item B<-q, --quotes> Replace quotes with underscores =item B<-Q, --questions> Replace questionmarks with underscores =item B<-n, --normalize> Normalize WAV files before burning =item B<-v, --verbose> Enable verbose output =item B<-h, --help> Show the help screen =item B<-V, --version> Show version and infos =back =head1 RETURN VALUE B returns 0 on success, 1 on error. =head1 DIAGNOSTICS This has to be written yet. =head1 EXAMPLES Once correctly configured MP3Roaster is very easy to use, just launch it from the command line with a bunch of compressed audio files, here is a short example: % mp3roaster "Root Dance.mp3" Free\ Software.flac bar.ogg Decoded.wav This will burn Root\ Dance.mp3, Free\ Software.flac bar.ogg and Decoded.wav on your audio CD preserving the song order as specified on the command line. Here is another example showing the usage of command line options like the dummy option: % mp3roaster -d "Root Dance.mp3" Free\ Software.flac bar.ogg Decoded.wav This will do the same job as above but with the laser of your CD writer turned off, so no data will be really written. You see MP3Roaster is really easy to use, this was one of my main goals while I've written the code: Keep it simple ;) =head1 FILES MP3Roaster can be configured through a system wide and a personal configuration file. When you run MP3Roaster it will first check for your personal configuration file in your home directory, if no one is found it will fall-back to the system wide configuration files placed in /etc. By default MP3Roaster installs the configuration files in /etc/mp3roaster, but there are other possible file locations for the configuration file: . System wide configuration in /etc . /etc/mp3roaster/mp3roasterrc (DEFAULT) . /etc/mp3roasterrc . Personal configuration in your home . ~/.mp3roaster/mp3roasterrc . ~/.mp3roasterrc So if you want to have personal MP3Roaster configuration file just copy the system wide configuration file to your home directory and edit it. =head1 CAVEHEATS None actually. =head1 BUGS There may be some minor troubles regarding file names, feel free to report any bugs you may encounter (In fact you shouldn't). =head1 NOTES There are currrently no special notes. =head1 SEE ALSO cdrecord. =head1 AUTHOR =over 4 =item Ivo Marino =item Lorenzo Taylor =back =head1 HISTORY Take a look at the ChangeLog for now. =cut # }}} # vim: ts=8:sw=4:sts=4:et:foldmethod=marker: mp3roaster-0.3.0/ChangeLog0000644000175000017500000002415610354605504013503 0ustar eimeim# # MP3Roaster CVS ChangeLog # # This ChangeLog file was automagically generated with cvs2cl, # all the informations were taken out of the CVS commit comments. # # Version 0.3.0 -- Wed, 28 Dec 2005 23:01:07 +0100 # ------------------------------------------------ # 2005-12-28 Wednesday 22:50 Ivo Marino * mp3roaster.1.gz (1.11): The MAN page has been updated. 2005-12-28 Wednesday 22:49 Ivo Marino * ChangeLog (1.24): The ChangeLog has been updated. 2005-12-28 Wednesday 22:45 Ivo Marino * Makefile (1.16): Updated for next release. 2005-12-28 Wednesday 20:57 Ivo Marino * mp3roasterrc (1.11): New default values. 2005-12-09 Friday 16:35 Ivo Marino * ChangeLog (1.23): The ChangeLog has been updated. 2005-12-09 Friday 16:34 Ivo Marino * Makefile (1.15): Various updates. 2005-10-09 Sunday 16:59 Ivo Marino * Makefile (1.14): Simple test. 2005-10-09 Sunday 16:15 Lorenzo Taylor * ChangeLog (1.22): The ChangeLog has been updated. 2005-10-09 Sunday 16:14 Lorenzo Taylor * Makefile (1.13): Fixed man page install 2005-10-09 Sunday 16:04 Ivo Marino * INSTALL (1.7): Cleanup. 2005-10-09 Sunday 16:00 Ivo Marino * README (1.7): Updated. 2005-10-09 Sunday 15:59 Lorenzo Taylor * ChangeLog (1.21): The ChangeLog has been updated. 2005-10-09 Sunday 15:59 Lorenzo Taylor * Makefile (1.12): Removed Developers from Makefile. 2005-10-09 Sunday 15:51 Lorenzo Taylor * ChangeLog (1.20): The ChangeLog has been updated. 2005-10-09 Sunday 15:50 Lorenzo Taylor * Makefile (1.11): Updated the Makefile. 2005-10-09 Sunday 14:52 Ivo Marino * INSTALL (1.6): Cleaned up. 2005-10-09 Sunday 11:28 Ivo Marino * ChangeLog (1.19): The ChangeLog has been updated. 2005-10-09 Sunday 11:28 Ivo Marino * mp3roaster.1.gz (1.10): The MAN page has been updated. 2005-10-09 Sunday 11:27 Ivo Marino * mp3roaster (1.22): 80 chars compliant (POD). 2005-10-09 Sunday 11:26 Ivo Marino * mp3roaster (1.21): 80 chars compliant. 2005-10-09 Sunday 08:24 Lorenzo Taylor * mp3roaster.1.gz (1.9): The MAN page has been updated. 2005-10-09 Sunday 08:24 Lorenzo Taylor * ChangeLog (1.18): The ChangeLog has been updated. 2005-10-09 Sunday 08:24 Lorenzo Taylor * mp3roaster (1.20): Updated help and perldoc messages for DAO burning mode. 2005-10-04 Tuesday 23:24 Ivo Marino * ChangeLog (1.17): The ChangeLog has been updated. 2005-10-04 Tuesday 22:54 Ivo Marino * mp3roaster.1.gz (1.8): The MAN page has been updated. 2005-10-04 Tuesday 22:50 Ivo Marino * mp3roaster (1.19): Code cleanup. 2005-10-04 Tuesday 16:59 Lorenzo Taylor * ChangeLog (1.16): The ChangeLog has been updated. 2005-10-04 Tuesday 16:58 Lorenzo Taylor * mp3roaster (1.18): The todo list in the source has been updated. 2005-10-04 Tuesday 16:46 Lorenzo Taylor * ChangeLog (1.15): The ChangeLog has been updated. 2005-10-04 Tuesday 16:45 Lorenzo Taylor * mp3roaster.1.gz (1.7): The MAN page has been updated. 2005-10-04 Tuesday 16:45 Lorenzo Taylor * mp3roaster (1.17), mp3roasterrc (1.10): - The @todo array has been removed and options are now available for each check files task. - The -c, --check and $config_check_files options have been removed, since it is now possible to enable or disable each individual task. - Fixed a quoting bug which caused check_files to die. 2005-10-03 Monday 12:24 Ivo Marino * ChangeLog (1.14): The ChangeLog has been updated. 2005-10-03 Monday 12:24 Ivo Marino * mp3roasterrc (1.9): Enable burnfree by default. 2005-10-03 Monday 11:38 Ivo Marino * ChangeLog (1.13): The ChangeLog has been updated. 2005-10-03 Monday 11:38 Ivo Marino * mp3roaster.1.gz (1.6): The MAN page has been updated. 2005-10-03 Monday 11:37 Ivo Marino * Developers (1.2), INSTALL (1.5), mp3roaster (1.16): Fixed Lorenzo's surname. 2005-10-03 Monday 11:24 Ivo Marino * ChangeLog (1.12): The ChangeLog has been updated. 2005-10-03 Monday 11:23 Ivo Marino * mp3roasterrc (1.8): Removed useless sentence. 2005-10-03 Monday 11:23 Ivo Marino * mp3roasterrc (1.7): Cleaned up and syntax check. 2005-10-03 Monday 11:15 Ivo Marino * ChangeLog (1.11): The ChangeLog has been updated. 2005-10-03 Monday 11:15 Ivo Marino * mp3roaster.1.gz (1.5): The MAN page has been updated. 2005-10-03 Monday 11:14 Ivo Marino * INSTALL (1.4), README (1.6), mp3roaster (1.15): Added WAV file to description and documentation. 2005-10-03 Monday 10:59 Ivo Marino * ChangeLog (1.10): The ChangeLog has been updated. 2005-10-03 Monday 10:59 Ivo Marino * README (1.5), mp3roaster (1.14): Some cosmetic code and documentation/example updates. 2005-10-03 Monday 10:48 Ivo Marino * mp3roaster (1.13): Introduced in order to avoid calling check_file_tpye() for each possible file type (MP3, WAV, OGG and FLAC). 2005-10-03 Monday 10:18 Ivo Marino * ChangeLog (1.9): The ChangeLog has been updated. 2005-10-03 Monday 08:05 Lorenzo Taylor * mp3roaster (1.12), mp3roasterrc (1.6): - Added support for burnfree buffer underrun protection. - Explicitly default to tao burning mode if $config_cdr_dao is 0. This prevents cdrecord from delaying if no mode is specified. 2005-10-03 Monday 03:29 Lorenzo Taylor * mp3roaster (1.11), mp3roasterrc (1.5): Added wav file time calculation. Fixed FLAC time calculation so it no longer requires dividing total samples by sample rate. 2005-09-30 Friday 18:24 Ivo Marino * mp3roaster.1.gz (1.4): The MAN page has been updated. 2005-09-30 Friday 18:21 Ivo Marino * mp3roaster.1.gz (1.3): The MAN page has been updated. 2005-09-30 Friday 18:21 Ivo Marino * README (1.4), mp3roaster (1.10): Updated. 2005-09-30 Friday 18:17 Ivo Marino * ChangeLog (1.8): The ChangeLog has been updated. 2005-09-30 Friday 18:16 Ivo Marino * mp3roaster.1.gz (1.2): The MAN page has been updated. 2005-09-30 Friday 18:16 Ivo Marino * Makefile (1.10): Added CVS commit after MAN page generation. 2005-09-30 Friday 18:15 Ivo Marino * mp3roaster (1.9): Updated PerlDoc. 2005-09-30 Friday 17:13 Ivo Marino * mp3roaster (1.8): Minor clean ups. 2005-09-30 Friday 17:12 Ivo Marino * mp3roaster (1.7): Main becomes a subroutine. ShowHelp() and ShowVersion() added. 2005-09-30 Friday 16:08 Ivo Marino * Makefile (1.9), mp3roaster.1.gz (1.1): Initial import. 2005-09-30 Friday 16:07 Ivo Marino * ChangeLog (1.7): The ChangeLog has been updated. 2005-09-30 Friday 16:06 Ivo Marino * mp3roaster (1.6): Added vim folding. 2005-09-30 Friday 13:47 Ivo Marino * mp3roaster (1.5): Fixed help (and MAN page) regarding quotes, second attempt. 2005-09-30 Friday 13:42 Ivo Marino * mp3roaster (1.4): Fixed help (and MAN page) regarding quotes. 2005-09-30 Friday 13:37 Ivo Marino * ChangeLog (1.6): The ChangeLog has been updated. 2005-09-30 Friday 13:37 Ivo Marino * mp3roaster (1.3): TOOD has been removed. 2005-09-30 Friday 13:37 Ivo Marino * mp3roaster (1.2): Replaced Audio::FLAC with new Audio::FLAC::Header. 2005-09-30 Friday 13:26 Ivo Marino * ChangeLog (1.5): The ChangeLog has been updated. 2005-09-30 Friday 13:26 Ivo Marino * mp3roasterrc (1.4): Various updates. 2005-09-30 Friday 13:25 Ivo Marino * Makefile (1.8): Added cvs_update. 2005-09-30 Friday 13:05 Ivo Marino * COPYING (1.3): Moved from Docs/ to root. 2005-09-30 Friday 13:02 Ivo Marino * INSTALL (1.3), README (1.3), mp3roasterrc (1.3): Moved from Docs/ to root. 2005-09-30 Friday 12:16 Ivo Marino * Makefile (1.7): Re-added Makefile -x. 2005-09-30 Friday 12:15 Ivo Marino * Makefile (1.6): Remove Makefile, for re-adding as -x. 2005-09-30 Friday 12:04 Ivo Marino * Makefile (1.5): Added the ChangeLog directive. 2005-09-30 Friday 12:03 Ivo Marino * ChangeLog (1.4): The ChangeLog has been updated. 2005-09-30 Friday 12:03 Ivo Marino * Developers (1.1): Initial import. 2005-09-30 Friday 11:56 Ivo Marino * ChangeLog (1.3): ChangeLog moved from Docs/ to root. 2005-09-30 Friday 11:52 Ivo Marino * mp3roaster (1.1), mp3roaster.pl (1.30): Renamed mp3roaster.pl to mp3roaster. mp3roaster-0.3.0/COPYING0000644000175000017500000004310110032053201012733 0ustar eimeim GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. mp3roaster-0.3.0/mp3roaster.1.gz0000644000175000017500000000671010354604274014530 0ustar eimeimCmp3roaster.1YksF_ENA6x$S1S뱽{5% oK ɩTF}{iAH+p-*V̕'fkq2˞}4S)OYӠ?1eId4 )OlOBb)7t,JzA%|RMƩui&73eoYB  pZ>twZ% N/b,]l:f4?(˵U9q,p)0`RLtI`F͖^oZ>>=ƸYhBrwEN _1T`I,uk*|(VEu%N:f+'yQT"qIXBS]p)d,T. -{zpZR) '46  r`M 1x%H`ߒޜC_@.ͅDST*H2E9'N%1/B#H͙͉/jΦGGbLr2'hOőb.V2H_E>"cp%v}Ny; xTa՘"h#Rs"&3pX_&qru,8{et]ѳ߈ãщ'TG~x&^I]ARL1֔.c2c* o`7RI\U2_.+]A'vx!g ou=mzEB/+wwj*͂( $+J۬c~Ut yXa ?3"bF(8+lTMϐ]8fIhOQ -Y ^N3YDM;1F@'0Ng.E.L͊!锚va<[sl⼡B@MBY? Sɶq'>+ɴ<詢Ez'ʥn37 Yt$0`= z?5kfd Eֺz#ś|XZ(}xaQspRDKZy/DUd#KQ$H]b {ʼcz!)7-"in.Ѫ:eLb3COڧ8#rÚ&gp UT4-VOt yt]C 2}pbei!`iWG:4(*ua}А@7 i^x82B9f=HNbúSIHvfl\ f7gR$H?{v*Kؿl~zWB6[\3~ *r>? p^6St}DlH:J{Ɗ1ج70ئ: 5ZYxjT =q s 5{Z磋մҹtƖgdǞ/po_VceAW2)^qݺW'k돽qP%0`$k 婳wO);T$g &IgP/s&7+[N,]cV3!E@rZ*%syf4SӍERSGrcjKKh$W' [nO/ov7oxZ)!WAwA$3ȥqXow?yuN>+oZL:޿͸a#x2iWT>Z? s&.d