Help Me Test My Program :-)


Recommended Posts

I have just finished my very crude version of pythonrip. It ripps music form audio cds and converts them to ogg or mp3. I would greatly appreciate any help with testing it. I realize there are other programs that do the same thing, like Grip. Since mine is command line only, it will run on any system that has python and cdparanoia installed, no gui needed.

One of the features of my program is this. It looks up all of the somg data online and names the songs appropriatley. It makes the titles more *nix(bash) friendly, by removing all spaces and replacing them with underscores. It also makes all letters lowercase. For ultimate bash compatibilty you can set it to also remove quotes form song titles.

The other great feature is you can set all of your options with a very simple config file, pythonriprc.py. By setting these options first this will allow you to just put in a cd(press return) and it will rip and encode it to your specifications. Some of the settings are to use, mp3 or ogg, bitrate, and destination directory.

to make it simple to test for you. All you need to do is untar the file, set any options you want to use in the pythonriprc.py file. Then FROM INSIDE THE DIRECTORY run the command ./pythonrip.py. If you do not run it from in the pythonrip directory, the config file you pyhtonriprc.py file will not be read.

Even if you just rip one cd and let me know if you get any erros or just have any suggestions, I would greatly appreciate it. Thanks.

download here

http://webpages.charter.net/lindbergfamily...nrip-0.2.tar.gz

I added one bugfix. the previous version would fail if you do not have the toolame package installed. pythonrip-0.2.1 fixes that

http://webpages.charter.net/lindbergfamily...ip-0.2.1.tar.gz

Edited by shanenin
Link to post
Share on other sites

I did one crappy job of explaining it. It rips music from cds and converts them to ogg, or mp3. To use mp3 you do need to have either lame or toolame installed.

I changed the initial post a little to better state its purpose.

Edited by shanenin
Link to post
Share on other sites

It's working in my gentooVM (32 bit), but not on my 64 bit host.

edit: It ripped the album, but error'd out before recoding. I have all tracks as trackx.cdda.wav.

Here is the error:

Traceback (most recent call last):
 File "/home/naraku/tmp/pythonrip-0.2/pythonrip.py", line 511, in ?
   main()
 File "/home/naraku/tmp/pythonrip-0.2/pythonrip.py", line 501, in main
   generic_song_list = compresser(installed_progs, comp_choice)
 File "/home/naraku/tmp/pythonrip-0.2/pythonrip.py", line 382, in compresser
   toolame = v_installed_progs['toolame']
KeyError: 'toolame'

Edited by naraku9333
Link to post
Share on other sites

thanks naraku9333 for giving it a try

I made some last minute changes in haste. I used the word lame where i needed toolame. The following change will fix it.

if you change this line 381

if 'lame' in v_installed_progs:

to

if 'toolame' in v_installed_progs:

What happened when you ran it on your 64 bit system, did you get errors? As simple of a program as it is, I would not of thought it would make any difference

Link to post
Share on other sites

Heres the error on Gentoo64:

pythonrip-0.2 (August 25, 2005)
(C) 2005 Shane Lindberg

Report bugs to [email protected]


       Please insert your music cd, and press return to continue.



reading the cd and looking up song data from the CDDB, this may take some time
please wait.....



Traceback (most recent call last):
 File "./pythonrip.py", line 511, in ?
   main()
 File "./pythonrip.py", line 456, in main
   cdrom = DiscID.open()
 File "/home/tmp/pythonrip-0.2/DiscID.py", line 31, in open
   return cdrom.open()
cdrom.error: (6, 'No such device or address')

It's probably not your program, it seems many python apps have some problems on amd64, i'll see if I can find a workaround.

Link to post
Share on other sites

there may be a problem for all of you guys trying to run the program as I reccomended. I installed the python packacke CDDC.py as the original author intended. This included two python modules, DiscID.py and CDDb.py. There is also a c module called cdrom.so.

The way I packaged it I left out the cdrom.so module. OOPs :blush:

@naraku9333

I wonder why you were able to run it at all. do you have a package called cdrom.so?

if you do it may be in your /usr/lib/python*/site-packages directory

here is the link to the CDDB package, which includes the cdrom.so module

http://cddb-py.sourceforge.net/CDDB.tar.gz

if you feel like it try and install it, then it may also run on your gentoo64 system

Edited by shanenin
Link to post
Share on other sites
aside from not renaming all the tracks on one

<{POST_SNAPBACK}>

you mean one of the cds failed, or named them incorrecty?

<{POST_SNAPBACK}>

It error'd out about halfway through renaming the tracks, I forgot to copy the error to post.

Link to post
Share on other sites
  • 3 weeks later...

I was ripping some discs and had one fail in the renaming process. If the CDDB data base returns a song with a '/' in the title it will cause the script to fail.

if you change line 425 from

os.rename(v_generic_song_list[i], new_name_list[i]+ "." +extention)

to

os.rename(v_generic_song_list[i], new_name_list[i].replace(' / ','-')+ "." +extention)

this should fix it

@naraku9333

I would bet money that is what caused the faliure on you disc

here is a updated version with the corrected code

http://webpages.charter.net/lindbergfamily...ip-0.2.2.tar.gz

Edited by shanenin
Link to post
Share on other sites

the line above will probably work in most situations, but haveing it search for " / ", instaed of "/" is leaving room for a song to screw it up, below is a much better was to do it, I just removed the spaces

os.rename(v_generic_song_list[i], new_name_list[i].replace('/','-')+ "." +extention)

Edited by shanenin
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...