No subject
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=
e
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=
e
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!
Simon
>
> If we can get scripts compatible between the two programs, I would
> commit it in a heartbeat.
>
> Thanks!
>
> allan
>
> On Mon, Aug 23, 2010 at 8:48 AM, Simon Matter <simon.matter at invoca.ch>
> wrote:
>> Hi,
>>
>> I've just came across a problem where I needed to run scanimage for AD=
F
>> in
>> 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
>> scanimage
>> 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
>> filename
>> "*.part" to the final name. Every non-zero exit status from the script
>> is
>> treated as an error. The script itself is called with two args, 1 bein=
g
>> the output file name of the temporary file just written, and 2 being t=
he
>> 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.
>>
>> Thanks,
>> Simon
>> --
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
>> 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
mailing list