This is the official page of the free program rip2ogg. It is a simple Python script, and I am not a Python expert, so don't expect much from it.
Since rip2ogg is free software, you can download, use, modify and redistribute it to your heart's content, with some caveats (see license). If you would like to share your corrections/additions with me, I'd gladly hear of them by e-mail.
Basically rip2ogg reads some ID from the CD already placed in the CD reader of the computer, and uses this ID to query the freedb site (free fork of CDDB). It then rips the tracks in the CD, and encodes them to Ogg Vorbis format, filling the tags of each track with the info taken from freedb.