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

m. allan noah kitno455 at gmail.com
Mon Aug 23 14:34:49 UTC 2010


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.

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 ADF 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 being
> the output file name of the temporary file just written, and 2 being the
> 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