[sane-devel] PATCH: Call script per output file from scanimage in batch mode

Simon Matter simon.matter at invoca.ch
Mon Aug 23 15:20:19 UTC 2010

Hi Allan,

> Simon, this is a great idea, and is also one of the last things
> missing for users to switch from the (now deprecated) scanadf to
> scanimage.
> Is there any chance you could find the time to make your patch
> compatible with the scanadf -S option? Specifically setting the
> various SCAN_* environment vars? You could add your page number as
> SCAN_PAGE or some such. You would need to check if scanadf cares about
> the return value for the script.

I was afraid this question might come up and I was already looking at
scanadf because I knew it does something like that. Due to my complete
lack of experience and knowledge in programming C I found it quite
difficult to implement the same behaviour which is why I decided to do it
in a much simpler way.

Scanadf has the ability to call scripts in background and wait or not wait
for them to finish before exiting. That's so simple to implement in the
scripts so I see no reason to hardwire it in scanimage.

More information about the sane-devel mailing list