If so, you could use the
arcue test.cue >> textfile.txt
and then parse the txt file for 'Successful Rip' or some such text, then continue if found, or exit if not.
Where's Synthetic Soul when you need him?
Yes, that's what I had in mind also. Never done anything like parsing a txt file before, so will have to wait for someone that does know how.
Well the only thing left between me and ripping my collection was getting this working in REACT, so I sat down today and put in the error codes into arcue.pl and the handling into the REACT config and I'm finally ready to start ripping my collection. Thanks so much for doing this up!
I came here to say that, and I see posts asking if this could work with REACT, and... yes, it certainly can! Here's how I did it.
in ARCue.pl, change the final output section like so to include a return value for the various outcomes, then exit the script with said return value. Only changes here are the 5 lines that have references to $errlev. value of 0 means no problem, only changed if there IS a problem.
my $errlev = 0;
if ($arDiscNotInDb) {
print "Disc not present in AccurateRip database.\n";
$errlev = 2;
} elsif ($arNetworkFailed) {
print "Failed to get $arUrl : " . $arNetworkFailed . "\n";
$errlev = 3;
} elsif ($accuratelyRipped == $trackCount) {
print "All Tracks Accurately Ripped.\n";
} else {
if ($notAccuratelyRipped >= 3) {
print "Your CD disc is possibly a different pressing to the one(s) stored in AccurateRip.\n"
}
printf "Track(s) Accurately Ripped: %d\n", $accuratelyRipped;
printf "**** Track(s) Not Ripped Accurately: %d ****\n", $notAccuratelyRipped;
printf "Track(s) Not in Database: %d\n", $notInDatabase;
$errlev = 1;
}
print "\n\n\n";
exit $errlev;
Then, over in the REACT.ini add a few variables like
RunAccurateRip=1
ARcue=@Tools@\newARcue.pl
Then in REACT-image.cfg add a little error handling. If the script returns a value of 1 (inaccurate rip) then abort, otherwise carry on to wave gain and encoding. I also added a label just before cleanup because I didn't want EAC to ask me to over-write files anymore.
REM **** use ARCue.pl (perl script) to verify wav image against AR database
IF NOT @RunAccurateRip@==1 GOTO end_RunAR
"@ARcue@" "@sourcecuesheet@"
REM if rip is inaccurate, abort, otherwise continue on to wave gain.
IF ERRORLEVEL 1 GOTO error_1
GOTO :end_RunAR
:error_1
ECHO Some tracks were not accurately ripped, aborting compression.
ECHO Exiting script...
PAUSE
REM delete old files so EAC doesn't ask to overwrite next time.
GOTO cleanup
:end_RunAR
I wrote other return values into arcue, but I'm personally only concerned about inaccurate rips at the moment.
I might expand later to do something with the discs that aren't in the DB, like making a list of them somewhere. Then I could re-rip them with secure test and copy and I submit the results to the DB, but I'll worry about that when I come across one.
I hope this helps you guys out, I spent all afternoon fiddling with funky win9x vs winNT batch syntax, but I've tested it out and it works great. Atleast for the one CD I've tested (i hardcoded the return value to test that the batch file could receive and interpret it okay.