Thu Aug 5 15:37:00 UTC 2010
but I decided to do it because it gives you more control.
The biggest problem are the various SCAN_* environment vars. I have just
no idea how this could be implemented without changing much code. Since
all values needed there are only local to scan_it() they are not availabl=
in main() for exporting them. If I understand this correctly then the
device var is a global static var used everywhere and if the same could b=
done with parm from scan_it() then it would be usable in main() as well.
But then I'm afraid that's considered bad style :(
Thanks for any insights!
> If we can get scripts compatible between the two programs, I would
> commit it in a heartbeat.
> On Mon, Aug 23, 2010 at 8:48 AM, Simon Matter <simon.matter at invoca.ch>
>> I've just came across a problem where I needed to run scanimage for AD=
>> batch mode but wanted to call a script for each page that was scanned.
>> I know that scanadf provides such functionality but we are using
>> for everything and I don't want to change that.
>> The proposed solution simply ads a --batch-script option which will be
>> called just before the output file is renamed from its temporary
>> "*.part" to the final name. Every non-zero exit status from the script
>> treated as an error. The script itself is called with two args, 1 bein=
>> the output file name of the temporary file just written, and 2 being t=
>> page number.
>> May I ask the SANE developers to review it and and commit to SCM if it
>> looks ok?
>> Attached patch is against latest stable 1.0.21 but it applies also to
>> current git.
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>> to sane-devel-request at lists.alioth.debian.org
> "The truth is an offense, but not a sin"
More information about the sane-devel