Your message dated Tue, 22 Aug 2023 12:46:36 +0200
with message-id <[email protected]>
and subject line Re: Bug#142579: padded sequence numbers for pnmsplit (patch 
included!)
has caused the Debian Bug report #142579,
regarding padded sequence numbers for pnmsplit
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
142579: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142579
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package:  netpbm
Version:  9.20-8
Severity:  wishlist

Hiya,

It would be nice if pnmsplit would pad the image number in the file names
 which it generates.  For example:  

  image000001.ppm, image000002.ppm, .. image000012.ppm, .. image099999.ppm

 vs.
 
   image1.ppm, image2.ppm, .. image12.ppm, .. image99999.ppm

This would make it a lot easier to process them in sequential order, since
 a simple alphabetical shell sort (a la 'ls') would do the trick.

Attached is a super-simple patch which pads the number to 6 places (enough
 to dump out the frames of 60 minutes of video to separate files).  If it
 is preferred to have the option of doing it either way (padded or unpadded),
 I'd be happy to code that up as well.

-matt m.


diff -ur netpbm-free-9.20/pnm/pnmsplit.1 netpbm-free-9.20-mine/pnm/pnmsplit.1
--- netpbm-free-9.20/pnm/pnmsplit.1     Mon Jun 19 14:26:19 2000
+++ netpbm-free-9.20-mine/pnm/pnmsplit.1        Fri Apr 12 14:46:16 2002
@@ -18,8 +18,8 @@
 .I output_file_pattern
 tells how to name the output files.  It is the file specification of
 the output file, except that the first occurence of "%d" in it is
-replaced by the image sequence number in unpadded ASCII decimal, with
-the sequence starting at 0.  If there is no "%d" in the pattern, 
+replaced by the image sequence number in 6-digit, zero-padded ASCII decimal,
+with the sequence starting at 0.  If there is no "%d" in the pattern, 
 .B pnmsplit
 fails.
 
diff -ur netpbm-free-9.20/pnm/pnmsplit.c netpbm-free-9.20-mine/pnm/pnmsplit.c
--- netpbm-free-9.20/pnm/pnmsplit.c     Sun Oct  7 17:09:35 2001
+++ netpbm-free-9.20-mine/pnm/pnmsplit.c        Fri Apr 12 14:41:25 2002
@@ -123,7 +123,7 @@
     size = strlen(output_file_pattern) - 2 + 10 + 1;
     *output_name_p = malloc(size);
 
-    sprintf(*output_name_p, "%s%d%s", before_sub, image_seq, after_sub);
+    sprintf(*output_name_p, "%s%06d%s", before_sub, image_seq, after_sub);
 
     free(before_sub);
 }



--- End Message ---
--- Begin Message ---
Version: 2:11.01.00-2

On 2002-04-12 Matto Marjanovic <[email protected]> wrote:

> Package: netpbm
> Version: 9.20-8
> Severity: wishlist

> Hiya,

> It would be nice if pnmsplit would pad the image number in the file names
>  which it generates.  For example:  

>   image000001.ppm, image000002.ppm, .. image000012.ppm, .. image099999.ppm

>  vs.

>    image1.ppm, image2.ppm, .. image12.ppm, .. image99999.ppm
[...]

pnmsplit has been superceded by pamsplit which offers the requested
feature.

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

--- End Message ---

Reply via email to