Re: [gentoo-user] showing files in numerical order

2016-11-02 Thread Daniel Campbell
On 10/29/2016 04:59 AM, Emanuele Rusconi wrote:
> Have a look at renamexm from sys-apps/rename (it's actually called
> rename
> but for Gentoo is was renamed to avoid a collision). It has a lot more
> options than rename and defaults to prompting you if you try to
> rename to
> an existing file.
> 
> 
> I use vidir from sys-apps/moreutils.
> All the power of vim (or whatever you set in $VISUAL) and no need to
> pray that your incantation is correct: you edit the file list as a text,
> and when you're satisfied, save and exit.
> 
> -- Emanuele Rusconi
> 
I second the vidir recommendation. I can't tell you how many times it's
made batch renaming easy, powerful, and intuitive for me.

-- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] showing files in numerical order

2016-10-29 Thread Emanuele Rusconi
>
> Have a look at renamexm from sys-apps/rename (it's actually called rename
> but for Gentoo is was renamed to avoid a collision). It has a lot more
> options than rename and defaults to prompting you if you try to rename to
> an existing file.


I use vidir from sys-apps/moreutils.
All the power of vim (or whatever you set in $VISUAL) and no need to pray
that your incantation is correct: you edit the file list as a text, and
when you're satisfied, save and exit.

-- Emanuele Rusconi


Re: [gentoo-user] showing files in numerical order

2016-10-27 Thread Neil Bothwick
On Thu, 27 Oct 2016 18:18:36 -0400, Philip Webb wrote:

> > I know it is a smart-arse answer, but it's better for sore eyes
> > if you rename your files to unique-width numbers.
> >   $ for f in image* ; do mv $f image_`printf %03d ${f##image}` ; done
> > This works for zsh and may need slight changes for bash.  
> 
> That's what I ended up doing, a job for a very rainy today.
> I did it with 'rename', which is fairly powerful,
> but dangerous if you don't concentrate, as it will overwrite files.

Have a look at renamexm from sys-apps/rename (it's actually called rename
but for Gentoo is was renamed to avoid a collision). It has a lot more
options than rename and defaults to prompting you if you try to rename to
an existing file.


-- 
Neil Bothwick

"Insanity: doing the same thing over and over again and expecting
different results." (Albert Einstein)


pgpFiuYSRrzbA.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] showing files in numerical order

2016-10-27 Thread Philip Webb
161020 Bertram Scharpf wrote:
> On Thursday, 20. Oct 2016, 08:25:22 -0400, Philip Webb wrote:
>> Using Gwenview with KDE 4, the thumbnail view showed images
>> in correct numerical order : image1 image2 ... image9 image10 ... .
>> With KDE 5, it's gone stupid : image1 image11 image12 ...
>> image 19 image2 image20 image21 ...
>> Is there a setting anywhere
>> to tell it to list files in the proper numerical order ?
> I know it is a smart-arse answer, but it's better for sore eyes
> if you rename your files to unique-width numbers.
>   $ for f in image* ; do mv $f image_`printf %03d ${f##image}` ; done
> This works for zsh and may need slight changes for bash.

That's what I ended up doing, a job for a very rainy today.
I did it with 'rename', which is fairly powerful,
but dangerous if you don't concentrate, as it will overwrite files.

I've sent bugs to KDE in the past with no result,
so I probably won't bother this time
& anyway it doesn't solve the immediate problem, which I've fixed otherwise.

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca




Re: [gentoo-user] showing files in numerical order

2016-10-21 Thread Andy Mender
>All digits are taken into account, but not as digits. This is a lexical
>sort based on characters, not numbers.

I think Neil Bothwick is right. Also, sorry for the joke earlier. I just
found it ironic that the file sorting in KDE 5 suddenly borked itself
and resembled file sorting in Windows in that respect.

Unless there is an explicit option somewhere in KDE 5 to choose
sorting mode or it's mentioned in some changelogs why sorting
was altered, I would file a bug report.

Best regards,
Andy

On 20 October 2016 at 22:04, J. Roeleveld  wrote:

> On Thursday, October 20, 2016 08:25:22 AM Philip Webb wrote:
> > Using Gwenview with KDE 4, the thumbnail view showed images
> > in correct numerical order : image1 image2 ... image9 image10 ... .
> > With KDE 5, it's gone stupid : image1 image11 image12 ...
> > image 19 image2 image20 image21 ...
> >
> > Is there a setting anywhere
> > to tell it to list files in the proper numerical order ?
>
> Are you sure it was showing them in numerical order?
> And not sorted based on timestamp?
>
> --
> Joost
>
>


Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread J. Roeleveld
On Thursday, October 20, 2016 08:25:22 AM Philip Webb wrote:
> Using Gwenview with KDE 4, the thumbnail view showed images
> in correct numerical order : image1 image2 ... image9 image10 ... .
> With KDE 5, it's gone stupid : image1 image11 image12 ...
> image 19 image2 image20 image21 ...
> 
> Is there a setting anywhere
> to tell it to list files in the proper numerical order ?

Are you sure it was showing them in numerical order? 
And not sorted based on timestamp?

--
Joost



Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread Bertram Scharpf
On Thursday, 20. Oct 2016, 08:25:22 -0400, Philip Webb wrote:
> Using Gwenview with KDE 4, the thumbnail view showed images
> in correct numerical order : image1 image2 ... image9 image10 ... .
> With KDE 5, it's gone stupid : image1 image11 image12 ...
> image 19 image2 image20 image21 ...
> 
> Is there a setting anywhere
> to tell it to list files in the proper numerical order ?

I know it is a smart-arse answer, but it's better for sore
eyes if you rename your files to unique-width numbers.

  $ for f in image* ; do mv $f image_`printf %03d ${f##image}` ; done

(This works for zsh and may need slight changes for bash.)

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread Neil Bothwick
On Thu, 20 Oct 2016 15:27:34 +0200, Andy Mender wrote:

> You may be surprised, but this is the proper numerical order - the way
> Windows Explorer normally does it.

Ah well, it must be right then!

> Only the 1st digit is taken into account as you noticed.

All digits are taken into account, but not as digits. This is a lexical
sort based on characters, not numbers.

I don't use Gwenview, but if this option was there and then removed, I
would consider that worthy of a bug report.


-- 
Neil Bothwick

Always remember you're unique, just like everyone else.


pgpKkp5oChxwo.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread Philip Webb
161020 Michael Mol wrote:
> On 20 October 2016 at 14:25, Philip Webb  wrote:
>> Using Gwenview with KDE 4, the thumbnail view showed images
>> in correct numerical order : image1 image2 ... image9 image10 ... .
>> With KDE 5, it's gone stupid : image1 image11 image12 ...
>> image 19 image2 image20 image21 ...
>> Is there a setting anywhere
>> to tell it to list files in the proper numerical order ?
> On Thursday, October 20, 2016 03:27:34 PM Andy Mender wrote:
>> You may be surprised, but this is the proper numerical order,
>> the way Windows Explorer normally does it.

You must be joking (no smile).

>> Only the 1st digit is taken into account as you noticed.
>> Care to try renaming the images to "image_xxx"? 

Yes, I do care ! -- I could insert initial zeros, but it's a lot of work.

> No, it's not the proper numerical order.  Yes, it's the proper sort
> for a sorting algorithm unaware that it's sorting strings
> with numeric components, such as a one examining input
> on a strictly codepoint-by-codepoint or character-by-character basis,
> but that's not the only way to sort.  I'd suggest filing a bug.
> I don't know enough about collations to know
> whether or not localization is supposed to cover numeric sorting,
> but the old behavior was clearly better, from a human UI standpoint.

I'll consider a bug.  My impression of KDE 5 is favorable so far,
so I would expect this is either configurable or an oversight.

Anyone else know more ?

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca




Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread Michael Mol
No, it's not the proper numerical order. Yes, it's the proper sort for a 
sorting algorithm unaware that it's sorting strings with numeric components, 
such as a one examining input on a strictly codepoint-by-codepoint or 
character-by-character basis, but that's not the only way to sort.

I'd suggest filing a bug. I don't know enough about collations to know whether 
or not localization is supposed to cover numeric sorting, but the old behavior 
was clearly better, from a human UI standpoint.


On Thursday, October 20, 2016 03:27:34 PM Andy Mender wrote:
> You may be surprised, but this is the proper numerical order - the way
> Windows Explorer
> normally does it. Only the 1st digit is taken into account as you noticed.
> 
> Care to try renaming the images to "image_xxx"? Perhaps that helps.
> 
> Best regards,
> Andy
> 
> On 20 October 2016 at 14:25, Philip Webb  wrote:
> > Using Gwenview with KDE 4, the thumbnail view showed images
> > in correct numerical order : image1 image2 ... image9 image10 ... .
> > With KDE 5, it's gone stupid : image1 image11 image12 ...
> > image 19 image2 image20 image21 ...
> > 
> > Is there a setting anywhere
> > to tell it to list files in the proper numerical order ?
> > 
> > --
> > ,,
> > SUPPORT ___//___,   Philip Webb
> > ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
> > TRANSIT`-O--O---'   purslowatchassdotutorontodotca
-- 
:wq

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] showing files in numerical order

2016-10-20 Thread Andy Mender
You may be surprised, but this is the proper numerical order - the way
Windows Explorer
normally does it. Only the 1st digit is taken into account as you noticed.

Care to try renaming the images to "image_xxx"? Perhaps that helps.

Best regards,
Andy

On 20 October 2016 at 14:25, Philip Webb  wrote:

> Using Gwenview with KDE 4, the thumbnail view showed images
> in correct numerical order : image1 image2 ... image9 image10 ... .
> With KDE 5, it's gone stupid : image1 image11 image12 ...
> image 19 image2 image20 image21 ...
>
> Is there a setting anywhere
> to tell it to list files in the proper numerical order ?
>
> --
> ,,
> SUPPORT ___//___,   Philip Webb
> ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
> TRANSIT`-O--O---'   purslowatchassdotutorontodotca
>
>
>


[gentoo-user] showing files in numerical order

2016-10-20 Thread Philip Webb
Using Gwenview with KDE 4, the thumbnail view showed images
in correct numerical order : image1 image2 ... image9 image10 ... .
With KDE 5, it's gone stupid : image1 image11 image12 ...
image 19 image2 image20 image21 ...

Is there a setting anywhere
to tell it to list files in the proper numerical order ?

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca