Bug#1026205: Unpaper errors for every scanned page

2022-12-19 Thread Jeff

On 19/12/2022 13:59, martin f krafft wrote:

Regarding the following, written by "Jeff" on 2022-12-19 at 09:26 Uhr +:

Yup. This patch fixes things:

I just tried with the patch applied, and I still get

[image2 @ 0x5609ccef9e40] The specified filename
'/home/ssd/madduck/.tmp/gscan2pdf-uiWw/eLwbJ_5EFR.pnm' does not
contain an image sequence pattern or a pattern is invalid.

for every page, even after clicking to "Hide all these messages"


Looks like temporary files can have underscores as well. Please try this 
instead (word instead of alnum).


diff --git a/lib/Gscan2pdf/Dialog/MultipleMessage.pm 
b/lib/Gscan2pdf/Dialog/MultipleMessage.pm

index f74779b1..8a48abaf 100644
--- a/lib/Gscan2pdf/Dialog/MultipleMessage.pm
+++ b/lib/Gscan2pdf/Dialog/MultipleMessage.pm
@@ -23,6 +23,10 @@ my $INTREGEX = qr{^(.*)   # start of message
   \b[[:digit:]]+\b # integer
   (.*)$   # rest of message
  }xsm;
+my $TEMPFILEREGEX = qr{^(.*)   # start of message
+  gscan2pdf[-][[:alnum:]]+/[[:word:]]+ # temp filename
+  (.*)$   # rest of message
+ }xsm;

 sub INIT_INSTANCE {
 my $self = shift;
@@ -266,6 +270,9 @@ sub munge_message {
 sub filter_message {
 my ($message) = @_;
 $message =~ s/\s+$//xsm;
+while ( $message =~ /$TEMPFILEREGEX/xsmo ) {
+$message =~ s/$TEMPFILEREGEX/$1%%t$2/xsmo;
+}
 while ( $message =~ /$HEXREGEX/xsmo ) {
 $message =~ s/$HEXREGEX/$1%%x$2/xsmo;
 }



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1026205: Unpaper errors for every scanned page

2022-12-19 Thread martin f krafft

Regarding the following, written by "Jeff" on 2022-12-19 at 09:26 Uhr +:

Yup. This patch fixes things:


I just tried with the patch applied, and I still get


[image2 @ 0x5609ccef9e40] The specified filename 
'/home/ssd/madduck/.tmp/gscan2pdf-uiWw/eLwbJ_5EFR.pnm' does not contain an 
image sequence pattern or a pattern is invalid.


for every page, even after clicking to "Hide all these messages"

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
"let me take you down, 'cause i'm going to strawberry fields.

 nothing is real and nothing to get hungabout.
 strawberry fields forever."
  -- the beatles


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#1026205: Unpaper errors for every scanned page

2022-12-19 Thread martin f krafft

Regarding the following, written by "Jeff" on 2022-12-19 at 09:26 Uhr +:

Yup. This patch fixes things:


Thank you!

--
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
may the bluebird of happiness twiddle your bits.


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#1026205: Unpaper errors for every scanned page

2022-12-19 Thread Jeff

On 17/12/2022 10:00, martin f krafft wrote:

Regarding the following, written by "Jeff" on 2022-12-16 at 16:44 Uhr +:

I think that this is this bug in unpaper:

https://github.com/unpaper/unpaper/issues/113


Okay, but gscan2pdf makes it an error, and I do wonder if it's possible 
to hide them…


Yup. This patch fixes things:

diff --git a/lib/Gscan2pdf/Dialog/MultipleMessage.pm 
b/lib/Gscan2pdf/Dialog/MultipleMessage.pm

index f74779b1..862c7c50 100644
--- a/lib/Gscan2pdf/Dialog/MultipleMessage.pm
+++ b/lib/Gscan2pdf/Dialog/MultipleMessage.pm
@@ -23,6 +23,10 @@ my $INTREGEX = qr{^(.*)   # start of message
   \b[[:digit:]]+\b # integer
   (.*)$   # rest of message
  }xsm;
+my $TEMPFILEREGEX = qr{^(.*)   # start of message
+  gscan2pdf[-][[:alnum:]]+/[[:alnum:]]+ # temp filename
+  (.*)$   # rest of message
+ }xsm;

 sub INIT_INSTANCE {
 my $self = shift;
@@ -266,6 +270,9 @@ sub munge_message {
 sub filter_message {
 my ($message) = @_;
 $message =~ s/\s+$//xsm;
+while ( $message =~ /$TEMPFILEREGEX/xsmo ) {
+$message =~ s/$TEMPFILEREGEX/$1%%t$2/xsmo;
+}
 while ( $message =~ /$HEXREGEX/xsmo ) {
 $message =~ s/$HEXREGEX/$1%%x$2/xsmo;
 }

It will be in the next release.



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1026205: Unpaper errors for every scanned page

2022-12-17 Thread martin f krafft

Regarding the following, written by "Jeff" on 2022-12-16 at 16:44 Uhr +:

I think that this is this bug in unpaper:

https://github.com/unpaper/unpaper/issues/113


Okay, but gscan2pdf makes it an error, and I do wonder if it's 
possible to hide them…


--
 .''`.   martin f. krafft 
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
"time flies like an arrow. fruit flies like a banana."

 -- groucho marx


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)


Bug#1026205: Unpaper errors for every scanned page

2022-12-16 Thread Jeff

Thanks for the report.

On 16/12/2022 11:05, martin f krafft wrote:

for every page processed by unpaper, I get two errors:

 1. [image2 @ 0x558772ceee40] The specified filename
'/home/ssd/madduck/.tmp/gscan2pdf-SMFz/OHSkXwKy5v.pnm' does not
contain an image sequence pattern or a pattern is invalid.
 2. [image2 @ 0x558772ceee40] Use a pattern such as %03d for an image
sequence or use the -update option (with -frames:v 1 if needed) to
write a single image.


I think that this is this bug in unpaper:

https://github.com/unpaper/unpaper/issues/113



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1026205: Unpaper errors for every scanned page

2022-12-16 Thread martin f krafft
Package: gscan2pdf
Version: 2.13.0-2
Severity: normal
Tags: upstream

Hey,

for every page processed by unpaper, I get two errors:

1. [image2 @ 0x558772ceee40] The specified filename 
   '/home/ssd/madduck/.tmp/gscan2pdf-SMFz/OHSkXwKy5v.pnm' does not 
   contain an image sequence pattern or a pattern is invalid.
2. [image2 @ 0x558772ceee40] Use a pattern such as %03d for an image 
   sequence or use the -update option (with -frames:v 1 if needed) 
   to write a single image.



-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gscan2pdf depends on:
ii  imagemagick8:6.9.11.60+dfsg-1.3+b4
ii  imagemagick-6.q16 [imagemagick]8:6.9.11.60+dfsg-1.3+b4
ii  libconfig-general-perl 2.65-2
ii  libdate-calc-perl  6.4-2
ii  libfilesys-df-perl 0.92-7+b1
ii  libgoocanvas2-perl 0.06-3
ii  libgtk3-imageview-perl 10-1
ii  libgtk3-perl   0.038-3
ii  libgtk3-simplelist-perl0.21-1
ii  libhtml-parser-perl3.79-1+b1
ii  libimage-magick-perl   8:6.9.11.60+dfsg-1.3
ii  libimage-sane-perl 5-1+b3
ii  liblist-moreutils-perl 0.430-2
ii  liblocale-codes-perl   3.72-1
ii  liblocale-gettext-perl 1.07-4+b3
ii  liblog-log4perl-perl   1.57-1
ii  libossp-uuid-perl [libdata-uuid-perl]  1.6.2-1.5+b11
ii  libpdf-builder-perl3.024-1
ii  libproc-processtable-perl  0.634-1+b2
ii  libreadonly-perl   2.050-3
ii  librsvg2-common2.54.5+dfsg-1
ii  libset-intspan-perl1.19-3
ii  libtiff-tools  4.4.0-5+b1
ii  libtry-tiny-perl   0.31-2
ii  sane-utils 1.1.1-6+b1

Versions of packages gscan2pdf recommends:
ii  djvulibre-bin   3.5.28-2
ii  pdftk   2.02-5+b1
ii  pdftk-java [pdftk]  3.3.2-1
ii  tesseract-ocr   5.1.0-2+b1
ii  unpaper 7.0.0-0.1
ii  xdg-utils   1.1.3-4.1

gscan2pdf suggests no packages.

-- no debconf information


-- 
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems