Re: [sane-devel] Scan quality enhancements/processing (vs Windows with Fujitsu ScanSnap S1500)

2017-07-06 Thread Roger
> is it necessary to always specify the paper size and scan area for every 
> single document? 

I'm not sure on this question, but for semi-auto cropping, you'll likely need 
to 
perform something to the similar, for which I (obviously) haven't yet mastered:

# Acquire scanned image
$ scanimage --format=tiff --resolution=300 > /tmp/receipt.tif

# Two likely incorrect incantation of ImageMagick convert for cropping an image.
$ convert -trim -fuzz 55% /tmp/receipt.tif /tmp/receipt-cropped.tif

$ convert -verbose -border 10x10 -trim +repage -fuzz 75% /tmp/receipt.tiff 
/tmp/receipt-cropped.tiff

# OCR the tiff file
$ tesseract /tmp/receipt-cropped.tiff /tmp/receipt.pdf

# Search multiple PDF files for TEXT
$ find /tmp -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep --with-filename 
--label="{}" --color "SOME_TEXT_HERE"' \;


As you can see, I was performing something similar to what you're doing, but 
then had to migrate to other tasks due to a lack of time.

Had I completed the above, one would have to admit, the above steps would be 
far more quickly performed rather than relying upon even the best of today's 
GUI tools directly due to the load time of the GUI.

-- 
Roger
http://rogerx.freeshell.org/


signature.asc
Description: Digital signature
-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] [janitorial] CI now builds snapshots with "funny" versions

2017-07-06 Thread Olaf Meeuwissen
Hi All,

I found it most unfair that sane-frontends didn't get the same snapshot
tarball treatment as sane-backends does so I set up a simple CI job over
on GitLab.com.  All it does is roll a source tarball.  Nothing more.  It
doesn't even try to compile the sources.  But!  We now have a

  sane-frontends-1.0.14-31-gc1b7785-dirty.tar.gz

on http://sane-project.org/snapshots/

Now I'm wondering if I should drop the daily git archives ...
# ... and update the SANE - Download web page[1].
# [1]: http://sane-project.org/source.html

For those of you running cron jobs against those git archives, perhaps
now is your chance to speak your mind (or change your cron job ;-)

Olaf Meeuwissen writes:

> Hi Allan,
>
> About two weeks ago I wrote on the sane-devel mailing list:
>
>> Dear list,
>>
>> [ ... creating `git describe --dirty` versioned tarballs ...]
>>
>> So then, what does happen on Alioth when the daily snapshots are made?
>> These snapshots are, unsurprisingly, courtesy of a daily cron job.  It
>> runs something close to
>>
>>   git archive --format=tar master | gzip > sane-backends-$DATE.tar.gz
>>
>> I've tried to run `make dist` on Alioth.  No such luck.  [...]
>>
>> The fact you cannot run `make dist` on Alioth is probably why the daily
>> snapshots are just `git archive`s, but those archives are not made the
>> way as our release tarballs.  And that bugs me.  Maybe I should change
>> that cron job to pull the tarballs from GitLab.com ...
>
> Well, I did just that and ran it manually without any hitch.  There is
> now an extra snapshot[1] that is made the same way we roll our release
> tarballs.
>
>  [1] http://sane-project.org/snapshots/
>
> This snapshot corresponds to the most current git checkout that passed
> the CI build at GitLab.com.
>
> The updated make-git-snapshots.sh should (famous last words!) run
> without any trouble and produce no output.  If, however, you start
> receiving mail from your daily sane cronjob, just forward it to me
> and I'll fix it up.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Softwarehttps://my.fsf.org/donate
 Join the Free Software Foundation  https://my.fsf.org/join

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Where is the define of SANE_I18N

2017-07-06 Thread DanTan
Hi Olaf,

I got it.
Thank you for your explain.


On 5 Jul 2017, at 7:52 PM, Olaf Meeuwissen 
> wrote:

Hi,

dan...@pek.destiny.com.cn writes:

Hey guys,

I have working on the source code of sane-backends, I found the macro
SANE_I18N is used to sane’s localization. But I just found the follow
lines of it’s define

#ifndef SANE_I18N
#define SANE_I18N(text) text
#endif

The above lines, dose nothing. So I wonder how SANE_I18N translate
these backends?

The backends don't translate.  It's the responsibility of the *frontend*
to translate the strings.  The SANE_I18N macro is only the marker we use
to tell xgettext which strings should be translated.  These strings end
up in po/sane-backends.pot.

The reasoning behind making the frontend responsible for translation is
that the backend may be executing remotely (e.g. via saned).  You don't
want to get the translations suitable for a remotely executing process.
This process may execute under a different LANG setting than your local
SANE frontend.

Let's say you run your frontend with LANG=zh_CN and scan via the net
backend on a server that just happens to run saned with LANG=fr_FR.
Would you be happy with French messages?  Probably not ;-)

Hope this helps,
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
Support Free Softwarehttps://my.fsf.org/donate
Join the Free Software Foundation  https://my.fsf.org/join

Dan Tan
dan...@pek.destiny.com.cn



The information contained in this transmission may contain privileged and 
confidential information. It is intended only for the use of the person(s) 
named above. If you are not the intended recipient, you are hereby notified 
that any review, dissemination, distribution or duplication of this 
communication is strictly prohibited. If you are not the intended recipient, 
please contact the sender by reply email and destroy all copies of the original 
message.

本郵件(含所有附件)包含受法律保護以及機密之資訊,僅供本郵件指定的收件人使用。如果您並非指定的收件人,請立即以電子郵件通知寄件人,並將本郵件及所有複印本刪除。請注意,非經授權,嚴格禁止閱覽、散播、散佈或複製本郵件及其內容。
-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org