[sane-devel] parsing help output of scanimage there has got to be a better way?

Jeff Sadowski jeff.sadowski at gmail.com
Mon Sep 18 21:01:05 UTC 2017


On Mon, Sep 18, 2017 at 2:56 PM, Jeff Sadowski <jeff.sadowski at gmail.com>
wrote:

>
>
> On Mon, Sep 18, 2017 at 2:15 PM, Jeff <jffry at posteo.net> wrote:
>
>> On 18/09/17 21:28, Jeff Sadowski wrote:
>> > The extremely hard part is coming up with a way to parse the stdout of
>> > "scanimage -h"
>> > Is there a good way to to this with regular expressions or something.
>>
>> If you look at the source of gscan2pdf
>> (https://sourceforge.net/p/gscan2pdf/code/ci/master/tree/lib
>> /Gscan2pdf/Scanner/Options.pm),
>> the _parse_scanimage_output() method does what you want.
>>
>> Thank you, I understand both well I should have not trouble converting it.
>

Ahh, I see ignore the common options and put them in manually. clear way of
getting around the issue. ;-)

>
>
>> It is written in Perl, but PHP is not very different.
>>
>> Regards
>>
>> Jeff
>>
>>
>> --
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>              to sane-devel-request at lists.alioth.debian.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20170918/f8c2a639/attachment-0001.html>


More information about the sane-devel mailing list