Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2002 04:56:21 -0800 (PST)
From:      "Pablo G. Morales" <pablo.morales@abitab.com.uy>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/44928: change of mantainer
Message-ID:  <200211051256.gA5CuL2K099535@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         44928
>Category:       ports
>Synopsis:       change of mantainer
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 05:00:12 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Pablo G. Morales
>Release:        4.5
>Organization:
none
>Environment:
FreebSD 4.5-RELEASE
>Description:
      Change of mantainer, and updates
>How-To-Repeat:
     # This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/audio/cd2mp3
#	/usr/ports/audio/cd2mp3/Makefile
#	/usr/ports/audio/cd2mp3/distinfo
#	/usr/ports/audio/cd2mp3/pkg-comment
#	/usr/ports/audio/cd2mp3/pkg-descr
#	/usr/ports/audio/cd2mp3/pkg-plist
#	/usr/ports/audio/cd2mp3/CREDITS
#	/usr/ports/audio/cd2mp3/ChangeLog
#	/usr/ports/audio/cd2mp3/README
#	/usr/ports/audio/cd2mp3/cd2mp3
#	/usr/ports/audio/cd2mp3/install
#
echo c - /usr/ports/audio/cd2mp3
mkdir -p /usr/ports/audio/cd2mp3 > /dev/null 2>&1
echo x - /usr/ports/audio/cd2mp3/Makefile
sed 's/^X//' >/usr/ports/audio/cd2mp3/Makefile << 'END-of-/usr/ports/audio/cd2mp3/Makefile'
X# New ports collection makefile for:	cd2mp3
X# Date created:				4 January 2000
X# Whom:					Pablo G. Morales <pablo.morales@abitab.com.uy>
X#
X# $FreeBSD: ports/audio/cd2mp3/Makefile,v 1.4 2001/01/22 14:37:30 kevlo Exp $
X#
X
XPORTNAME=		cd2mp3
XPORTVERSION=		0.82
XPORTEPOCH=		1
XCATEGORIES=		audio
XMASTER_SITES=		http://netwarrior.esmartweb.com/cd2mp3/
X# MASTER_SITE_SUBDIR=	${PORTVERSION}
X
XMAINTAINER=		pablo.morales@abitab.com.uy
X
XRUN_DEPENDS=		lame:${PORTSDIR}/audio/lame/ \
X			dagrab:${PORTSDIR}/audio/dagrab
X
XNO_BUILD=		yes
XWRKSRC=			${WRKDIR}/cd2mp3
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/cd2mp3 ${PREFIX}/bin/cd2mp3
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/cd2mp3
X	${INSTALL_DATA}  ${WRKSRC}/README ${PREFIX}/share/doc/cd2mp3/README
X	${INSTALL_DATA}  ${WRKSRC}/CREDITS ${PREFIX}/share/doc/cd2mp3/CREDITS
X	${INSTALL_DATA}  ${WRKSRC}/ChangeLog ${PREFIX}/share/doc/cd2mp3/ChangeLog
X.endif
X
X.include <bsd.port.mk>
END-of-/usr/ports/audio/cd2mp3/Makefile
echo x - /usr/ports/audio/cd2mp3/distinfo
sed 's/^X//' >/usr/ports/audio/cd2mp3/distinfo << 'END-of-/usr/ports/audio/cd2mp3/distinfo'
XMD5 (cd2mp3-0.82.tar.gz) = 793ea84236757e1f86baac25f41a52ff
END-of-/usr/ports/audio/cd2mp3/distinfo
echo x - /usr/ports/audio/cd2mp3/pkg-comment
sed 's/^X//' >/usr/ports/audio/cd2mp3/pkg-comment << 'END-of-/usr/ports/audio/cd2mp3/pkg-comment'
XEasy To Use MP3 Manipulation And Creation Tool For The Shell.
END-of-/usr/ports/audio/cd2mp3/pkg-comment
echo x - /usr/ports/audio/cd2mp3/pkg-descr
sed 's/^X//' >/usr/ports/audio/cd2mp3/pkg-descr << 'END-of-/usr/ports/audio/cd2mp3/pkg-descr'
XCD2MP3 It's a front end to the dagrab and lame utilities.
X
XIt features single track encoding, entire CD encoding, ripping of tracks
Xto .WAV files, and encoding .WAV files to MP3 Format.
X
XFurther documentation will be available soon at my website.
X
XWWW: http://www.net-warrior.esmartweb.com/
X
X- Pablo G. Morales
Xpablo.morales@abitab.com.uy
X   pablogm@adinet.com.uy
END-of-/usr/ports/audio/cd2mp3/pkg-descr
echo x - /usr/ports/audio/cd2mp3/pkg-plist
sed 's/^X//' >/usr/ports/audio/cd2mp3/pkg-plist << 'END-of-/usr/ports/audio/cd2mp3/pkg-plist'
Xbin/cd2mp3
X%%PORTDOCS%%share/doc/cd2mp3/README
X%%PORTDOCS%%share/doc/cd2mp3/ChangeLog
X%%PORTDOCS%%share/doc/cd2mp3/CREDITS
X%%PORTDOCS%%@dirrm share/doc/cd2mp3
END-of-/usr/ports/audio/cd2mp3/pkg-plist
echo x - /usr/ports/audio/cd2mp3/CREDITS
sed 's/^X//' >/usr/ports/audio/cd2mp3/CREDITS << 'END-of-/usr/ports/audio/cd2mp3/CREDITS'
XVarious People who have helped with cd2mp3
X------------------------------------------
X
XPablo G. Morales -  Main Port Mantainer 
XJamie Heckford	 -  Original Author
XPitor Zaniewicz  -  Polish Translations
XDmitry Makovey   -  Posted some Usefull hacks
XConrad Sanderson -  Usefull feedback and suggestions
XDerek Harper	 -  Code Cleanup and extra defaults added
X
X - Special Thanks To The Whole Community.
END-of-/usr/ports/audio/cd2mp3/CREDITS
echo x - /usr/ports/audio/cd2mp3/ChangeLog
sed 's/^X//' >/usr/ports/audio/cd2mp3/ChangeLog << 'END-of-/usr/ports/audio/cd2mp3/ChangeLog'
X                This Is The Change Log FIle For CD2MP3
X		   	  By Pablo G. Morales
X		         pablogm@adinet.com.uy
X		      pablo.morales@abitab.com.uy
X
X
X- October 28-10-2002
X   	* Subrutine check() removed
X	* Subrutine ask_samle_rate() removed
X	* In encode_track() we check if the users selects a track or not.
X	* In subrutine wav(), we check if there is CD in the tray.
X	* In entire() subrutine we check is there is a CD in the tray.
X	* Subrutine entire() splitted in two.
X	* Subrutine encode_entre() implemented.
X	* Configuration is read from the config file .cd2mp3
X	* Bug fixes.
X
X
X- October 09-10-2002
X	* Mayor chnges were made.
X	* New Menu, new options implemented.
X	* Configuration section Added.
X	* Subrutine configuration() added.
X	* Configuration file .cd2mp3 implemented.
X	* COnfiguration is read from the configuratio file.
X	
X
END-of-/usr/ports/audio/cd2mp3/ChangeLog
echo x - /usr/ports/audio/cd2mp3/README
sed 's/^X//' >/usr/ports/audio/cd2mp3/README << 'END-of-/usr/ports/audio/cd2mp3/README'
X	        =======================================
X    		CD2MP3 README - Ver 0.82 - PGM 09/10/02
X		=======================================
X		
X
XCD2MP3 - Written by Jamie Heckford, jamie@jamiesdomain.co.uk, now mantained
Xby Pablo G. Morales -> pablogm@adinet.com.uy 
X		    -> pablo.morales@abitab.com.uy
X
XUses lame and dagrab (freeware/GPL)
X
X
XThis program can be freely distributed, modified, sold etc.. as long as this
Xbanner message and links to my website are retained in the source code.
X
X------------
XIntroduction
X------------
X
XCD2MP3 takes the hassle away from trying to remember dagrab and lame command 
Xline switches, and having to go through the process of having to use 2 programs
Xto make an mp3. cd2mp3 brings up a small set of prompts asking you how you would
Xlike the mp3 created. Answering them takes about 10 seconds, and then cd2mp3
Xwill encode the mp3/cd/tracks for you.
X
X-------
XChanges
X-------
X
XRead The ChangeLog for details.
X
X    * Bug in Menu Option 5 fixed
X    * Fixed wildcard filename input for lame in entire CD option
X    * Entire CD option now deletes wav files progessively, using less disk space
X
X    ( Thanks to Derek Harper for work on the above )
X
X------------
XRequirements
X------------
X
XCD2MP3 Requires The Following Stuff :
X    -    Perl 5 (minimum) Installed as /usr/bin/perl 
X    	 (see troubleshooting if it is elsewhere)
X    
X    -	LAME installed in your path
X
X    -	dagrab installed in your path 
X
X
XLAME and Dagrab can both be found at our download area which is :
X	http://download.cd2mp3.org.uk/
X	http://netwarrior.esmartweb.com/ ( For The Lastes Updates )
X	    
X
X------------
XInstallation
X------------
X
XChange to the directory you unpacked the gzipped file to and run (as root): 
X    ./install
XThis will place the program in /usr/local/bin and clean up the temp directory.
XIf you can't get root access then copy the cd2mp3 binary/script to whereever
Xyou wish.
X
X-----
XF.A.Q
X-----
X
X1.) Where can I obtain the most resent version from??
X    1.A) http://www.jamiesdomain.org.uk/
X    1.B) http://www.netwarrior.esmartweb.com/ ( For The Latest Updates )    
X
X2.) Do I have to pay for it?
X    2.A) Nope, cd2mp3 is freeware. Donations are accepted though :)
X
X3.) Can I modify the source?
X    3.A) Copying is the biggest form of flattery. Seriously, feel free to, 
X	 just leave my name in it :)  
X
X4.) I hate the program.
X    4.A) Just Remove it then. :)
X
X---------------
XTroubleshooting
X---------------
X
X1.) Perl is not installed as /usr/bin/perl
XSolution: Open up the cd2mp3 file (in vi or similar). It is installed in 
X	  /usr/local/bin/cd2mp3. Change the first line #!/usr/bin/perl to:
X	   #!/path/to/perl/on/your/system
X
X2.) I don't have LAME or dagrab.
XSolution: You can obtain the latest versions from our download area which is 
X	   http://download.cd2mp3.org.uk/ 
X	   http://netwarrior.esmartweb.com/ ( For The Latest Updates )
X
X
X3.) It doesn't work!!
XSolution: Please mail any bug reports (including the error message if given 
X	  and information on your machine )
X          to: -> pablogm@adinet.com.uy
X	      -> pablo.morales@abitab.com.uy	  
X
X
X
X------
XOthers
X------ 
X
X    
XDAGRAB
X    Primary-site: http://web.tiscalinet.it:/marcellou/dagrab.html
X    Alternate-site: sunsite.unc.edu:/pub/Linux/apps/cds
X    
XLAME Ain't an MP3 Encoder
X     http://www.mp3dev.org
X		  
X
XEOFEND-of-/usr/ports/audio/cd2mp3/README
echo x - /usr/ports/audio/cd2mp3/cd2mp3
sed 's/^X//' >/usr/ports/audio/cd2mp3/cd2mp3 << 'END-of-/usr/ports/audio/cd2mp3/cd2mp3'
X
X#!/usr/bin/perl
X
X# cd2mp3 - MP3 manipulation utility - PGM 09/10/02
X# Mantainded by Pablo G. Morales : 
X# 	pablogm@adinet.com.uy 
X#	pablo.morales@abitab.com.uy
X
X# Uses LAME and Dagrab
X# This program can be freely distributed, modified, sold etc.. as
X# long as this banner message and links to my website are retained.
X
X# Read the ChangeLog to see the latest modifications, the CREDITS file for
X# acknowledgements and the README file for a general overview of the appz.
X
X
X#*****************************************************************************
X
X
X#Where To Store encoded Files
X$default_output_path = "$ENV{HOME}/cd2mp3";
X
X# User Defined
X$user_output_path = "";
X
X#Name Of The Encoded File
X$default_filename = "RippeDTrack";
X
X# User Defined
X$user_filename = "";
X
X#CD-ROM Device Path
X$default_cdrom_path = "/dev/cdrom";
X
X# User Defined
X$user_cdrom_path = "";
X
X# Where the configuration file resides
X# By default we use the users's HOME, and by now it's not selectable by the user
X$default_configfile = "$ENV{HOME}/.cd2mp3rc";
X
X
X# LAME Encoder Options, we use this default settings by now, I'll make more
X# flexible net time.
X$default_lame_parameters = "--alt-preset extreme";
X
X
X# User LAME default settings
X$user_lame_parameters = "";
X
X
X
Xuntil (0) 
X    
X {	
X	# This function reads configuration from config file if it exist
X	# at start-up
X        # maybe this could fit on a BEGIND END statement.
X	 read_config();
X
X	# Main Appz
X	  menu();
X 
Xsub read_config()
X
X	#This function will read configuration values from the config file 
X	# if it exist, if it does not, will call configuration() to create 
X 	# and ask for configuration parameters.
X	
X 	# If the file exists, we only open it and read it contents, and
X	# asign the values to the corresponding variables.
X
X	{
X
X#local ($line) = "" ;
X	
X	if (open(CONF, $default_configfile)) {
X		# Lets read values, and asign them to the global variables
X		$line = <CONF>;
X
X		while ($line ne "")
X		{
X
X	        	if ($line =~ "CD-ROM_DEVICE="){
X				$line =~ s/CD-ROM_DEVICE=//;
X				chomp ($line);
X				$user_cdrom_path=$line;
X				}
X		
X	        	if ($line =~ "OUTPUT_PATH="){
X				$line =~ s/OUTPUT_PATH=//;
X				chomp($line);
X				$user_output_path=$line;
X				}
X		
X	        	if ($line =~ "LAME_PARAMETERS="){
X				$line =~ s/LAME_PARAMETERS=//;
X				chomp($line);
X				$user_lame_parameters=$line;
X				}
X		
X	        	if ($line =~ "DEFAULT_FILENAME="){
X				$line =~ s/DEFAULT_FILENAME=//;
X				chomp($line);
X				$user_filename=$line;
X				}
X
X		 		$line = <CONF>;	
X			
X		    } #End Of While
X		
X	  }# End Of If
X
X	       # If it does not exists, lets call the configuration menu
X               # and make some question. 
X	
X			else { configuration();}
X	close (CONF);
X
X}  # End Of SubRutine
X
X#*****************************************************************************
X
Xsub menu {
X
X  local($eors) = 0; 
X  show_info();	
X
X   print "\n";
X   print "    		    (1).[      Encode A Single Track      ]\n";
X   print "		    (2).[      Encode The Entire CD       ]\n";
X   print "		    (3).[  Rip A CD Track To A .WAV File  ]\n";
X   print "		    (4).[    Encode A .WAV File To MP3    ]\n";
X   print "		    (5).[       Encode A Directory        ]\n";	
X   print "		    (6).[      Configuration Sektor       ]\n";	
X   print "		    (7).[             CD Info             ]\n";
X   print "		    (8).[           Quit CD2MP3           ]\n";
X   print "\n";
X   print " * Option -> ";
X   
X   print STDIN " ";
X   $eors = <STDIN>;
X
X   if ($eors == 1) {
X         #Rip And Encode a single track from CD
X          encode_track();
X      }
X   elsif ($eors == 2 ) {
X          #Rip And Encode The Entire CD
X          entire();
X      }
X   elsif ($eors == 3 ) {
X          #Ripe a Track to .WAV file
X          wav();
X      }
X   elsif ($eors == 4 ) {
X          #Encode a .WAV File To MPG4
X           w2m();
X      }
X   elsif ($eors == 5 ) {
X	  #Encode wav files in a directory
X	  directory_encode();
X      }		
X
X   elsif ($eors == 6 ){
X	 #Configuration Menu
X	  configuration();
X	}	
X
X   elsif ($eors == 7 ){
X	  #List CD Tracks
X          cdinfo();
X        }
X 	
X   elsif ($eors == 8 ) {
X	  #Get Out
X          print "\nBye!\n";
X	  exit;	
X      }
X   else {
X         print "\nInvalid Option, Please Try Again\n";
X
X	}#End Of Sub Function
X
X#******************************************************************************
X
X# Print Welcome Screen
X
Xsub show_info {
Xsystem("clear");
X
Xprint   "                ==================================================\n";
Xprint   "                |           Cd2Mp3 - V0.81 21/01/01 JAH          |\n";  
Xprint   "                |          http://www.jamiesdomain.org.uk        |\n";
Xprint   "                |================================================|\n";
Xprint   "                |   Please check dagrab and LAME are installed   |\n";
Xprint   "                |              In your path                      |\n";
Xprint   "                |================================================|\n";
Xprint   "                |   This free software project is sponsored by   |\n";
Xprint   "                |    Psi-Domain - http://www.psi-domain.co.uk    |\n";
Xprint   "                ==================================================\n"; 
Xprint "\n";
X         
X 	}
X
X
X#*****************************************************************************
X# This function makes sure the info passed to LAME is correct
X
Xsub sytx_correct {
X            if ($track <= 9) {
X             $fileprfx = "track0";
X             }
X            else {
X             $fileprfx = "track";
X            }
X}
X
X#****************************************************************************
X# Encode single track
X
Xsub encode_track {
X   # Sampling rate input and checking
X
X   system ("clear");	
X   print "                 ******************************************** \n";
X   print "                 * * * *         Encoding Menu        * * * * \n";
X   print "                 ******************************************** \n";	
X   print "\n";
X   print "\n";		
X   
X   print "\n[ Which Track Do Ya Wanna Encode ]: ";
X   print STDIN " ";
X   chomp($track = <STDIN>);
X
X   if ($track eq ""){
X  	print" >> NO Track Number Selected << \n";
X	system("sleep 2");
X	menu();
X	
X	}	
X
X   else {
X
X   	sytx_correct();
X   	print "\n * Now Ripping $fileprfx$track!\n\n";
X   	encode();
X
X	}
X   
X}
X
X#******************************************************************************
X
X# Function to run dagrab and LAME, and clean up any temp files
X
Xsub encode { 
X 	  	 
X	  show_info();	
X	  print " [ Extracting Track Number -> $track ]\n";
X          print "\n";
X
X	  system ("dagrab -v -d $user_cdrom_path $track");
X	  #system ("dagrab -v -d $drive $track");
X          print "\n * Da $fileprfx$track.wav Ripped!! Encoding To MP3..\n";
X          print "   * Ready To Encode BaBy\n";
X          system ("sleep 2");
X
X	  show_info();	
X
X          system ("lame $user_lame_parameters $fileprfx$track.wav $user_output_path/$user_filename$track.mp3");
X
X	  system ("rm $fileprfx$track.wav");
X	  print "\n * Temporary File $fileprfx$track.wav Deleted.\n";
X          print "\n * MP3 Created As -> $user_filename$track.mp3 \n\n"; 
X          print "   * Wait A Second...\n"; 
X          system ("sleep 4");
X}
X
X
X#****************************************************************************
X# Function to ask for mp3 output file name
X
Xsub ask_output_mp3 {
X
Xlocal($accept)= "";
Xlocal ($outputmp3path) = "";
X
X   print "\n[ Enter Output Path ] ";
X   print "\n[ Default Path Is -> $default_output_path ] ";
X   print STDIN " ";
X   chomp($outputmp3path = <STDIN>);	
X
X   	# Check if the directory exists
X	if($outputmp3path eq ""){$outputmp3path=$default_output_path;}
X 	if (opendir(DIR,"$outputmp3path")){
X	     print " * OutPut Directory Opened Successfully\n";	
X	     print " * Using -> $outputmp3path\n";	
X	     close (DIR);	
X		}
X	else {		
X	   print " *  Destination Directory Needs To Be Created\n"; 
X           system ("sleep 2");
X	   if(mkdir("$outputmp3path",0750))
X		{
X	   	 print (" * Output Path Created -> $outputmp3path \n");		
X	    	 close (DIR);
X		}
X	
X	   else { print "Cannot Create Directory, Permission Maybe ?\n";
X		system("sleep 2");
X		close (DIR);
X		encode_track();
X		}
X            }
X
X   print "\n[ Enter FileName ] ";	
X   print "\n[ Default FileName Is -> $default_filename ] ";
X   print STDIN " ";
X   chomp($outputmp3name = <STDIN>);
X 
X	  verify_path_name(); 
X
X
X   system ("clear");
X   print "                 ******************************************** \n";
X   print "                 * * * *         Encoding Menu        * * * * \n";
X   print "                 ******************************************** \n";
X 
X  print "\n                          [ < Gattered Information > ]       ";
X  print "\n";
X
X  print "\n * Da MP3 Will Be Stored In -> $outputmp3path";
X  print "\n * Using Da Name -> $outputmp3name";
X  print "\n * Using A Bitrate Of -> $finalsamp kb";
X  print "\n";
X  print "\n";
X
X  print " * Accept Seetings Yy/Nn ?\n";
X  print STDIN " ";
X  chomp($accept = <STDIN>);
X  if ($accept =~ /\b[nN]\b/ ) {
X	system("clear");
X	show_info();
X	encode_track();
X	}
X	
X} #End Of Function
X
X#*****************************************************************************
X
Xsub verify_path_name { 
X# Verity that $outputmp3name and $outputmp3path are not NULL
X
X     if ($outputmp3name eq "" ) {
X         $outputmp3name = $default_filename;
X          }
X
X     if ($outputmp3path eq "" ) {
X         $outputmp3path = $default_output_path;
X
X	   }
X	}
X
X#****************************************************************************
X# List The CD Tracks
Xsub cdinfo {
X
X        # show_info();
X        system("clear");
X	if(system ("dagrab -i -d $user_cdrom_path"))
X		{
X		print " ERROR, No CD Inside, Check And Try Again \n";
X		system("sleep 2");
X		} 
X
X	else {
X		system ("clear");
X	        system ("dagrab -i -d $user_cdrom_path"); 
X		system("sleep 4");
X	    }
X
X}
X#****************************************************************************
X
X# Creates the configuration file if it does not exist
X# otherwise , ask for configuration parameters, this function
X# it's also called on startup, this should be called the very
X# first time this script is executed.
X
Xsub configuration() {
X               
X        #Lets check if the file exist, open returns True On Succeed
X        if(open (CONF , ">$default_configfile"))
X                {
X		#If It Exist, we read data from it
X		ask_data_conf();
X		}
X        else {
X		#If It Does Not exist, Lets Create It
X                open(CONF, ">$default_configfile");
X                print"* Configuration File Created, Wait *\n" ;
X                system ("sleep 2");
X		print "* Now I Will Create Data Structure, Wait *\n";
X		system ("sleep 2");
X		
X		#After The Creation, we copy the structure
X		# This Is Done Only The Very First Time, On Creation
X		print CONF ("#    * * CD 2 MP3 Configuration FIle * *\n");
X		print CONF ("#     * * Bye Net Warrior (P) 2002 * *\n");
X		print CONF ("#       * * pablogm\@adinet.com.uy * *\n");
X		print CONF ("#       * * This Is GNU Software * *\n");
X		print CONF "\n";
X		print CONF "\n";
X
X		print CONF ("# Generic Parameters\n");
X		print CONF ("CD-ROM_DEVICE=\n");
X		print CONF ("OUTPUT_PATH=\n");
X		print CONF ("DEFAULT_FILENAME=\n");
X
X 		print CONF "\n";
X		print CONF "\n";
X
X		print CONF ("# Lame Encoder Parameters\n");
X	 	print CONF ("LAME_PARAMETERS=\n");
X
X		print "* Data Structure Created *\n";
X		system ("sleep 2");
X		
X                close (CONF);
X                      }
X	}# End Of Sub Function
X
X#************************************************************************
X
Xsub ask_data_conf() { 
X	
X        
X	# Archive Data Format
X        # CD To MP3 Configuration File
X
X        # CDROM_DEVICE=  Where To Rip From
X        # OUTPUT_PATH=   Where To Store The Ripped .WAV files
X        # LAMTE_PARAMETERS, replace DEFAULT_BITRATE= 
X        # are the lame parameters  
X        # DEFAULT_FILENAME= Default .MPG File Name
X
X#Define The array With Params
X@params = ("CDROM_DEVICE=", "OUTPUT_PATH=", "LAME_PARAMETERS=","DEFAULT_FILENAME=" );
X
Xlocal($option) = 0;
X	
X
X	system("clear");
X
X	print "                    **********************************\n";
X	print "                    * * * * Configuration Menu * * * *\n";
X	print "                    **********************************\n";
X	print "\n";
X
X	print "* Enter CD-ROM Path, Enter For Default ->: ";
X	print STDIN " ";
X	chomp($cdpath = <STDIN>);
X	if ($cdpath eq ""){
X		$cdpath = $default_cdrom_path;
X		print "  * Using -> $cdpath\n";
X		}
X	print "  * $params[0]$cdpath\n";
X
X
X	print "* Enter OutPut Path, Enter For Default ->: ";
X	print STDIN " ";
X	chomp ($outputpath = <STDIN>);
X	if($outputpath eq ""){
X		$outputpath = $default_output_path;
X		print "  * Using -> $outputpath\n";
X		}	
X	print "  * $params[1]$outputpath\n";
X
X	print "* Enter LAME Encoding Parameters, Press Enter For Defaults ->: ";
X	print STDIN " ";
X	chomp($defaultbtr = <STDIN>);
X	if ($defaultbtr eq ""){
X		$defaultbtr = $default_lame_parameters;
X		print "  * LAME Encoding Options -> $defaultbtr \n";
X		}
X	print "  * $params[2] $defaultbtr\n";
X
X	print "* Enter Default FileName ->: ";
X	print STDIN " ";
X	chomp ($default_name = <STDIN>);
X	if($default_name eq "" ){
X		$default_name = $default_filename;
X		print"  * Using Default -> $default_filename\n";
X		}
X	print "  * $params[3]$default_name\n";
X
X	# Time to write to configuration File
X	#read file $line <FILEOPEN>;
X	print "\n\n";
X	print " [> Press 0 To Accept Parameters <]";
X	print STDIN " ";
X	chomp ($option = <STDIN>);
X
X 	if ($option == 0 ){
X		save_config();
X		}
X	else {
X		system ("clear");
X		print "\n";
X		print "\n";
X		print "\n";
X		print "\n";
X		print "\n			*************************\n";
X		print "\n			* Configuration Aborted *\n";
X		print "\n			*************************\n";
X		system("sleep 2");
X		}
X	}
X
X  }#End Of Sub Function
X
X#*************************************************************************
X
Xsub save_config()
X		{
X	# By now, we just overwrite the file with the new configuration
X        # instead of replacing the values  PARAM="VALUE", the performance
X        # has nothing to do in here, cause it's very small plain text file
X
X	print CONF ("#    * * CD 2 MP3 Configuration FIle * *\n");
X        print CONF ("#     * * Bye Net Warrior (P) 2002 * *\n");
X        print CONF ("#       * * pablogm\@adinet.com.uy * *\n");
X        print CONF ("#       * * This Is GNU Software * *\n");
X        print CONF "\n";
X        print CONF "\n";
X
X	print CONF ("# Generic Parameters\n");
X	print CONF ("CD-ROM_DEVICE=$cdpath\n");
X        print CONF ("OUTPUT_PATH=$outputpath\n");
X        print CONF ("DEFAULT_FILENAME=$default_name\n");
X	print CONF "\n";
X	
X	print CONF ("# Lame Encoder Parameters\n");
X        print CONF ("LAME_PARAMETERS=$defaultbtr\n");
X
X	 
X	close (CONF);
X	system ("clear");
X	print "\n";
X	print "\n";
X	print "\n";
X	print "\n";
X	print "\n";
X	
X	print ("\n			*********************************\n");
X	print ("\n			*   System Configuration Saved  *\n");
X	print ("\n			*********************************\n");
X	system ("sleep 2");
X
X
X}
X
X#*****************************************************************************
X
X# Function to ask for location of CD-ROM drive
X
Xsub ask_cdrom_drive {
X
X   print "\n[ Enter Your CD-ROM Device Path  ]";
X   print "\n[ Default -> $default_cdrom_path ] ";
X   print STDIN " ";
X   chomp($drive = <STDIN>);
X
X   if ($drive eq "") {
X      $drive = $default_cdrom_path;
X      print "  * Using Default -> $drive :\n"; }
X
X   else { $drive = <STDIN>; }
X	
X   } # End Of Function
X
X#*****************************************************************************
X# Entire A FULL CD
X
Xsub entire {
X   
X   system ("clear");	
X   print "                 ********************************************\n";
X   print "                 * * * *    Entire CD Ripping Menu    * * * *\n";
X   print "                 ********************************************\n";
X   print "\n";
X   print "\n";	
X
X           print "[ > Using User Defined Settings < ]\n";
X           print "[   * CD Device -> $user_cdrom_path ]\n";
X           print "[   * Sample Rate Of -> $user_lame_parameters ]\n";
X           print "[   * Output Directory -> $default_output_path ]\n";
X 	   print "[   * OK, Encoding Entire CD To $user_output_path ]\n\n";
X	   
X if (system("dagrab -v -d $user_cdrom_path -a -f $user_output_path/track\%02d.wav")){
X	print " ERROR No CD Inside, Check And Try Again\n";
X	system ("sleep 4"); 
X	
X	}
X
X	else {
X
X	 system("dagrab -v -d $user_cdrom_path -a -f $user_output_path/track\%02d.wav");
X	encode_entire();
X	}
X
X}
X
X#****************************************************************************
X
Xsub encode_entire()
X
X{
X
X   local ($lame_input_wav) = "";
X   local ($encode_name) = "CD2MP3_Encode";	
X
Xwhile($lame_input_wav = <$user_output_path/*.wav>) 
X		{
X
X   system ("clear");
X   print "                 ********************************************\n";
X   print "                 * * * *    Entire CD Ripping Menu    * * * *\n";
X   print "                 ********************************************\n";
X   print "\n";
X   print "\n";
X
X   system("lame $user_default_parameters $lame_input_wav ");
X   qx{rm $lame_input_wav};
X	}
X   
X   print "[ * CD Ripped And Encoded In -> $user_output_path ]\n";
X   system("sleep 4");
X			
X          
X} #End Of Subrutine
X
X#**************************************************************************** 
X# .WAV file routine
X# Extracts a CD AUDIO Tracks.
X
Xsub wav {
X
Xlocal ($wavout) = "";
Xlocal ($wavrip) = "";
X
X   system ("clear");	
X   print "                 ********************************************\n";
X   print "                 * * * * *   Wav File Ripping Menu  * * * * *\n"; 
X   print "                 ********************************************\n";
X   print "\n";
X   print "\n";
X
X
X 	print "\n[ Enter Output .WAV File to Rip Without Extention ]\n";
X        print "    * ie FileName, Enter For User Defaults * -> : ";
X        print STDIN " ";
X        chomp($wavout = <STDIN>);
X		if ($wavout eq "" ){
X			$wavout = $user_filename;
X			print "    * Using Default Name -> $wavout \n";
X		}
X
X        print "    * OK, Output File Will Be -> $wavout \n";
X        print "    * Output Directory -> $user_output_path \n\n";
X        print "[ Which Track Do You Want To Rip ? ]: ";
X        print STDIN " ";
X        chomp($wavrip = <STDIN>);
X
X		if ($wavrip == 0 ){
X			print "    *  No Track Number Entered * \n";
X			system("sleep 2");
X			}
X		else {
X
X        	print "\n  > Ripping Track Number $wavrip < * \n\n";
X
X        	if(system("dagrab -d $user_cdrom_path -v -f $user_output_path/$wavout$wavrip.wav $wavrip ")){
X			print "  ERROR, No CD Inside, Check And Try Again\n";	
X			system ("sleep 4");}
X
X		else {
X
X        	system("dagrab -d $user_cdrom_path -v -f $user_output_path/$wavout$wavrip.wav $wavrip ");
X        	print "\n  * Track $wavout$wavrip.wav Ripped To $user_output_path ! *\n\n";
X		system("sleep 4");
X			}
X		
X		}
X        
X	} #End of sub
X
X#****************************************************************************
X
X# Encode a wav file to an MP3
X# .WAV to MP3
X
Xsub w2m { 
X
Xlocal ($dele) = "";
Xlocal ($wavdest) = "";
Xlocal ($wavpath) = "";
Xlocal ($encode_name) = "" ;
X
X
X   system ("clear");	
X   print "                 ********************************************\n";
X   print "                 * * * *  WAV To MP3 Encoding Menu  * * * * *\n";
X   print "                 ********************************************\n";
X   print "\n";
X   print "\n";	
X           
X           print "\n[ Enter Source WAV File Name ]: ";
X  	   print STDIN " ";
X	   chomp ($wavpath = <STDIN>);	
X
X		if ($wavpath eq "" ){
X			print "  * No Filename Entered!, Try Again \n";
X			system("sleep 4");
X			menu();
X		}
X
X	   print "  * Enter OutPut MP3 File Name, ENTER For Default ->";
X	   print STDIN " ";
X	   chomp ($encode_name = <STDIN> );		
X		if ($encode_name eq ""){
X		 	$encode_name = "CD2MP3_Encoded.mp3";  	
X		}
X		else { $encode_name = $wavout;}
X
X           print "   * Delete .WAV File After Encode ? \(y/n\): ";
X           print STDIN " ";  
X           chomp($dele = <STDIN>);
X
X	   system ("clear");
X     print "                 ********************************************\n";
X     print "                 * * * *  WAV To MP3 Encoding Menu  * * * * *\n";
X     print "                 ********************************************\n";
X     print "\n";
X     print "\n";
X
X           	if ( -e $wavpath ) {
X	   		system("lame $user_default_parameters $wavpath $user_output_path/$encode_name"); }
X		
X		else {
X			print "   * Cannot Open File For Encoding ! \n";
X			print "   * Check File Name And Access ! \n";
X			system ("sleep 4");
X			menu();
X			}
X
X             if ($dele =~ /\by\b/) {
X		      print "   * Deleting Source File \n ";
X		      system("rm $wavpath");
X		      system ("sleep 2");	
X                  }
X
X           	print "\n * $wavpath Encoding DONE. \n";
X		system("sleep 4");
X
X		exit;	
X
X	} #End Of Subrutine
X
X
X#*****************************************************************************
Xsub directory_encode()
X# Encodes wav files in a directory, cd2mp3 by default
X	{
X
Xlocal ($wavfiles) = "";
Xlocal ($wavs) = "";
Xlocal ($wav_directory) = "";
X
X
X     system ("clear");	
X     print "                 ********************************************\n";
X     print "                 * * * *  Directory WAV Encoding Menu * * * *\n";
X     print "                 ********************************************\n";
X     print "\n";
X	
X	print " [ Enter Directory Path Where WAV Files Reside ] \n";
X	print " [ Press ENTER For Default Path -> $user_output_path ]\n"; 
X	print "   -> ";
X	print STDIN " ";
X	chomp($wav_directory = <STDIN>);
X	
X	opendir (WAVDIR, $wav_directory);
X
X	while ($wavs = readdir (WAVDIR))
X		{
X		print "$wavs\n";
X
X		}
X
X
Xclosedir (WAVDIR);
X}
X
X#*****************************************************************************
X
X } #End Of Script (P) October 2002 
END-of-/usr/ports/audio/cd2mp3/cd2mp3
echo x - /usr/ports/audio/cd2mp3/install
sed 's/^X//' >/usr/ports/audio/cd2mp3/install << 'END-of-/usr/ports/audio/cd2mp3/install'
X#!/usr/bin/perl   
X
Xsystem("clear");
X
Xprint " > This Program Installs CD2MP3 In /usr/local/bin/cd2mp3 <\n";
Xprint " > If This Fails For Any Reason, Copy The cd2mp3 binary/script <\n";
Xprint " > To A Location Of Your Choice <\n";
Xprint " -> Installing CD2MP3 Version 0.82 <-\n";
Xprint ".";
Xsystem ("sleep 4");
X
Xsystem("cp cd2mp3 /usr/local/bin/cd2mp3");
Xprint ".";
X
Xsystem("chmod 775 /usr/local/bin/cd2mp3");
Xprint ".";
Xprint "[ Done, Enjoy ]\n\n";
END-of-/usr/ports/audio/cd2mp3/install
exit

 
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211051256.gA5CuL2K099535>