=========================
= What You Have To Know =
=========================

what it does
------------
rip is a program that uses:
	cdparanoia to rip cd tracks to wavs
	lame to encode wav to mp3
	cddb to  * name the resulting mp3 file
            * install MP3 ID info


what it needs
-------------
  * perl, cdparanoia (the ripper), lame (the encoder)
  * the CDDB_get perl module (by Armin Obersteiner), available at CPAN.
  * the MP3::Info perl module (by Chris Nandor), available at CPAN.
  

copyright
---------
The author is Peter Jay Salzman.  It's copyright 2001 and is released under
the GNU GPL license.  If you add new functionality or improve my perl, send
me your code and tell me what you did.  I'm still learning Perl, and
appreciate the benefit of your expertise.


usage
-----
To use rip, just invoke it with (spaces unimportant):

	./rip 2, 4-6, 10,12

and that'll rip tracks 2,4,5,6,10,12.  To rip the whole cd, just use:

	./rip --whole-cd


hanging
-------
If it hangs, the cddb server is busy.  Just wait.  It'll happen.  See TODO.




===============================
= What You Might Want To Know =
===============================

Some useful variables
---------------------
Most of this stuff you won't have to monkey with.

my $cdrom   = "/dev/cdrom";              # Device to use
my $bitrate = "128";                     # mp3 bitrate
my $mode    = "s";                       # stereo, mono.  see man lame.
my $DB_HOST = "freedb.freedb.org";       # cddb server
my $dryrun  = TRUE;                      # should we really rip or not?
my $debug   = TRUE;                      # should we print debug info?
$cdparanoia = `which cdparanoia`;        # path to cdparanoia
$lame = `which lame`;                    # path to lame


Bugs
----
None known of yet.


TODO
----
* Get a list of CDDB servers and ping them to use the fastest server.  The
    hanging bit can be tedious sometimes.  I need to use the Net::Ping module,
    create a hash using $CDDBHOSTS and pingtimes.  Then $DBHOST will be
    whatever server has the lowest ping time.
* Implement the concept of a "output directory".
* A Tk and/or curses interface would be cool.




==============================================
= What You Probably Couldn't Care Less About =
==============================================

me
--
My name is Peter Jay Salzman <p@dirac.org>.  Homepage: www.dirac.org/p.  I'm
a physics grad student at UC Davis, a Linux/GNU fanatic, opensource advocate
and a hardcore gamer.  I love mp3's and use them to learn of new music that I
never would be exposed to otherwise.  


people who helped me
--------------------
Whether they realize it or not, the following people helped me write this by
answering my Perl questions: Dale Bewley, Henry House, Micah Cowen.


argument processing
-------------------
1. Create a string with all the arguments, so "rip 2, 3, 4-6" means the string
   is "2,3,4-6".
2. We split on commas and assign to an array, so @array=(2,3,4-6).
3. Search for elements with a "-" and push (4 .. 6) onto the array.  Now,
   @array=(2,3,4-5,4,5,6).
4. Remove any elements containing "-" since we don't need them anymore.
   Array becomes @array=(2,3,4,5,6).
