[sane-devel] help with improving text scans
2008/12/20 m. allan noah kitno455 at gmail.com: I can't speak for Jeremy, but there is the general bug that gscan2pdf only shows options that it knows, which hides alot of nice compression, or image processing, or imprinter options provided by office scanners. Nobody has ever reported this general bug to me. I have implemented any requests for specific options I have received. Having written Perl bindings for SANE, I will be able to do a more general interface, but please file the bug on Sourceforge or against the Debian package in the mean time. Perhaps you have some ideas on what to do for those scanners which offer so many options that the option dialog window is so tall that it must be scrolled - maybe some way of showing/hiding certain options that you don't use. Regards Jeff
[sane-devel] help with improving text scans
On Sat, Dec 20, 2008 at 10:13 AM, Jeffrey Ratcliffe jeffrey.ratcliffe at gmail.com wrote: 2008/12/20 m. allan noah kitno455 at gmail.com: I can't speak for Jeremy, but there is the general bug that gscan2pdf only shows options that it knows, which hides alot of nice compression, or image processing, or imprinter options provided by office scanners. Nobody has ever reported this general bug to me. I have implemented any requests for specific options I have received. And that is the problem: a user that only uses gscan2pdf won't know the other options are there, and so won't report them missing. Having written Perl bindings for SANE, I will be able to do a more general interface, but please file the bug on Sourceforge or against the Debian package in the mean time. Yes- your Perl bindings are most useful, hopefully you will find the time to convert the app to use them :) Perhaps you have some ideas on what to do for those scanners which offer so many options that the option dialog window is so tall that it must be scrolled - maybe some way of showing/hiding certain options that you don't use. Hopefully the backend will breakup the options into reasonable sized chunks with SANE_TYPE_GROUP options, and you could add a tab for each group. Also, some options will have SANE_CAP_ADVANCED set, and you can hide those until a user requests to see adv options. allan Regards Jeff -- The truth is an offense, but not a sin
[sane-devel] help with improving text scans
2008/12/20 m. allan noah kitno455 at gmail.com: Having written Perl bindings for SANE, I will be able to do a more general interface, but please file the bug on Sourceforge or against the Debian package in the mean time. Now I remember the other problem with a general interface - internationalisation. scanimage, for instance, doesn't seem to have been translated: LANGUAGE=de scanimage --help produces English output. If I look in saneopts.h, the macro SANE_I18N is used for all the titles, but how do I get at the translations? The option titles for the options that are currently supported in gscan2pdf are translated in gscan2pdf (currently 26 languages have been started). Regards Jeff
[sane-devel] help with improving text scans
On 20.12.2008 17:05, Jeffrey Ratcliffe wrote: 2008/12/20 m. allan noah kitno455 at gmail.com: Having written Perl bindings for SANE, I will be able to do a more general interface, but please file the bug on Sourceforge or against the Debian package in the mean time. Now I remember the other problem with a general interface - internationalisation. scanimage, for instance, doesn't seem to have been translated: LANGUAGE=de scanimage --help produces English output. If I look in saneopts.h, the macro SANE_I18N is used for all the titles, but how do I get at the translations? Just open sane's .mo file with gettext :) (OK, I'm more involved with the competition -- Python --, so I don't know if a gettext implementation for Perl exists, but I would be really suprised if it doesn't.) Abel
[sane-devel] help with improving text scans
2008/12/20 abel deuring adeuring at gmx.net: Just open sane's .mo file with gettext :) (OK, I'm more involved with the competition -- Python --, so I don't know if a gettext implementation for Perl exists, but I would be really suprised if it doesn't.) Locale::gettext is the Perl module, which gscan2pdf uses for its own localisation. #!/usr/bin/perl use warnings; use strict; use Locale::gettext; use POSIX; # Needed for setlocale() setlocale(LC_MESSAGES, ); my $d = Locale::gettext-domain(sane-backends); print $d-get(Preview), \n; works. What I really meant is that scanimage doesn't seem to use SANE's translations, which makes it difficult to provide a consistent interface for the different frontends scanimage/scanadf/libsane-perl. But you are right - I can get the English strings from scanimage, and feed them through gettext. Unfortunately scanimage --help only gives the option titles for the groups. Can the backends be induced to give the option titles in some debug mode? Regards Jeff
[sane-devel] help with improving text scans
On Sat, Dec 20, 2008 at 5:15 PM, Jeffrey Ratcliffe jeffrey.ratcliffe at gmail.com wrote: 2008/12/20 abel deuring adeuring at gmx.net: Just open sane's .mo file with gettext :) (OK, I'm more involved with the competition -- Python --, so I don't know if a gettext implementation for Perl exists, but I would be really suprised if it doesn't.) Locale::gettext is the Perl module, which gscan2pdf uses for its own localisation. #!/usr/bin/perl use warnings; use strict; use Locale::gettext; use POSIX; # Needed for setlocale() setlocale(LC_MESSAGES, ); my $d = Locale::gettext-domain(sane-backends); print $d-get(Preview), \n; works. What I really meant is that scanimage doesn't seem to use SANE's translations, which makes it difficult to provide a consistent interface for the different frontends scanimage/scanadf/libsane-perl. actually, your life would be harder if scanimage DID use translations, cause you would have to reverse the translation to figure out the meaning. ;) But you are right - I can get the English strings from scanimage, and feed them through gettext. Unfortunately scanimage --help only gives the option titles for the groups. Can the backends be induced to give the option titles in some debug mode? IIRC, the groups are not required to have a description? allan -- The truth is an offense, but not a sin