Max Post Processing: custom shell script

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
chappie
Posts: 2
Joined: Thu Mar 13, 2008 6:06 pm

Max Post Processing: custom shell script

Post by chappie » Thu Mar 13, 2008 8:53 pm

Hi,

First of all, kudos on a great program! Coming from a Windows environment, Max is the perfect replacement to EAC.

I'd like to do some post-processing in a shell script after each file is ripped/encoded. I found that the preferences in Max will only allow application bundles to be specified as post-processing applications (rather than a shell script with 0755 permissions). I ended up wrapping my shell script in an app bundle, "MaxPostProcessingShellScript.app" and I've verified the app bundle works. I'm having trouble figuring out how to get the filename from Max to my script. I thought it would be passed in as a command line argument, but that isn't the case. I've looked through the Max source and can't find where the post-processing apps are executed. If someone can point me to an example of a program that pulls in the filename args, that would probably be enough (say in the tagosx source).

Thanks for any help

-Ryan

chappie
Posts: 2
Joined: Thu Mar 13, 2008 6:06 pm

Re: Max Post Processing: custom shell script

Post by chappie » Thu Mar 13, 2008 11:10 pm

I've verified that when Tag is the post-processing application (specified in Max preferences), then the filename is transferred. I'm starting to think the pasteboard is being used, but I've been unable to verify this. NSPasteboard is playing hard to get :-)

User avatar
sbooth
Site Admin
Posts: 2449
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Max Post Processing: custom shell script

Post by sbooth » Thu Mar 13, 2008 11:46 pm

Check out EncoderTask.m:338. Max uses NSWorkspace's openFile:withApplication: selector for post processing.

Post Reply