I’m a little tired. I ended up working on my PHP DVD ripper scripts all day today. I got a lot of good stuff done though, and learned lots too.
I’ve done a rewrite this time with the whole interactive mode in mind. At first it got really tricky because I was having problems accessing stdin within a loop. The code wouldn’t wait for the user input, it would just keep going. Turns out that using handles to open and close it were the culprit, so now I just do $foo = fread(STDIN, 255); The php manual has a really good introductory chapter that covers that stuff (like say, important constants). It helped me get over the rough spots.
Another interesting part of the code is I’m using do … while control statements, which I’ve never had to use before. In this case, I need them because I can’t let them continue until the input matches a certain string or valid entry. Pretty interesting approach.
The code is coming along. I’d say its about halfway done overall, but the second half is going to be a snap since I don’t need to replace hardly any of it. I’ve got it setup so you can “archive” a disc. That doesn’t sound impressive at all, but the hard part was that all of it is completely driven by the user interface *and* you can do it either interactively through the console questions or with the argument flags. I like it. :)
All the other stuff is really simple, since it’s just a matter of rip track foo to location bar and encode with options x and y. All the settings are already in the user’s config file, and the functions are already working great, so it should go really fast from here on out. I’d just like to be able to use it again soon so I can watch some Brady Bunch.