|
Replies:
20
-
Pages:
2
[
1
2
| Next
]
-
Last Post:
15 Jul 25, 11:54
Last Post By: RobM
|
|
|
Posts:
3
Registered:
2-Sep-2017
|
|
|
|
JAlbum image sort order with underscore
Posted:
9 Jul 25, 08:22
|
|
|
|
|
|
Hallo,
strange question i think.
I name my images yymmdd_hhmmss or : day underscore ( _ ) time.
Now i have an album with 2 activities in parallel. Hence, i want to group each activity and for some images, i have put 2 underscores ( __ ) between day and time. The activity with 2 underscores should come first in the album.
In file explorer, this sorts just right : _, 0, 1, 2, ... : the underscore comes first.
But in JAlbum, it sorts differently : 0, 1, 2, ..., _ : the underscore comes last.
See print screen in attachment, it is a simplified example, but i would expect
01__01_PVE
01__02_PVE
01__03_PVE
01_01_PVE
01_02_PVE
01_03_PVE
02_01_PVE
in JAlbum as well.
I tried "name" and "name (simple)" in settings/Pages/Image ordering, but this makes no difference.
Is there a setting that i should change ?
Thanks for helping me out,
Regards,
Peter
|
|
|
Posts:
3,950
Registered:
4-Aug-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 12:32
in response to: peterverm
|
|
|
|
You could use custom ordering and drag the images to the positions you want. You could use subfolders instead of extra underscores.
|
|
|
Posts:
3
Registered:
2-Sep-2017
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 15:05
in response to: RobM
|
|
|
|
i agree, but still : why does JAlbum sort differently ?
|
|
|
Posts:
8,098
Registered:
31-Jan-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 15:10
in response to: JeffTucker
|
|
|
|
|
|
Here's a simplified chart.
|
|
|
Posts:
8,098
Registered:
31-Jan-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 16:54
in response to: davidekholm
|
|
|
The ASCII sequence certainly has some interesting bits of perversity. Besides the "sort to the end" characters like underscore, there's also a run of special characters that appears between 0-9 and A-Z!
I agree that the sort sequence should mimic File Explorer, in any event, even though it makes it difficult to come up with file names that automatically sort to the end. You're left with "zzz" combinations, because all of the displayable special characters come earlier. While it is possible to use some Unicode characters, that should be discouraged, for obvious reasons.
Both File Explorer and Finder also tinker with casing. They're sensitive to case, but the sort sequence goes, for example, A01, a01, B01, b01, etc.
ETA: Not quite accurate. File Explorer still doesn't differentiate between A01 and a01, regarding them as duplicates. It's amazing that they've stubbornly stuck to that.
|
|
|
Posts:
3,711
Registered:
18-Oct-2002
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 17:26
in response to: JeffTucker
|
|
|
Here's a beta for you to try that has a more clever name ordering:
https://jalbum.net/download/beta/jalbum-core.jar
(Put it inside jAlbum's lib folder, thereby replacing the existing jalbum-core file.
Changes:
- Name ordering is now closer to Windows Explorer and Finder
- Name ordering is now also locale aware. For instance, if jAlbum is set to Swedish, it will order åäö after z, but if set to English, it will be aaoz (i.e. treating the a-ring and umlauts as accents to a and o)
- Polished UI a bit (uses less and more sublime lines, making more look and feels appealing now)
- Presents the image(s) being dragged as a drag-image during drag and drop
|
|
|
Posts:
8,098
Registered:
31-Jan-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
9 Jul 25, 17:40
in response to: davidekholm
|
|
|
|
This isn't mimicking File Explorer.
File Explorer:
01__01_PVE
01__02_PVE
01__03_PVE
01_01_PVE
01_02_PVE
01_03_PVE
02_01_PVE
jAlbum:
01_01_PVE
01_02_PVE
01_03_PVE
01__01_PVE
01__02_PVE
01__03_PVE
02_01_PVE
In short, underscore isn't consistently sorting before numerals.
|
|
|
Posts:
3,711
Registered:
18-Oct-2002
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
10 Jul 25, 13:02
in response to: JeffTucker
|
|
|
|
Thanks for pointing that out Jeff. After 25 (or so) back-and-forth with Chat GPT, I now believe it behaves correctly (b2)
|
|
|
Posts:
8,098
Registered:
31-Jan-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
10 Jul 25, 14:41
in response to: davidekholm
|
|
|
|
That appears to work, at least for the case presented by the OP. I'll see if I can book some time with the JeffBot™ for more extensive testing, but it's tough to get an appointment.
|
|
|
Posts:
3,950
Registered:
4-Aug-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
10 Jul 25, 21:49
in response to: davidekholm
|
|
|
|
Just tried the update. -1.jpg comes first, _1.jpg comes second and 1.jpg comes third.
Should 1.jpg come before _1.jpg?
Edited by: RobM on 10 Jul 2025, 20:50
Finder shows _1.jpg then -1.jpg and last 1.jpg
|
|
|
Posts:
8,098
Registered:
31-Jan-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
10 Jul 25, 22:08
in response to: RobM
|
|
|
|
File Explorer:
_1.jpg
1.jpg
-1.jpg
Fun for the whole family.
But if you're going to put the special characters before the regular characters, 1.jpg should be last, not first. The dash and underbar should sort before the numerals.
If you're preserving the relative positions of the special characters, but putting them all before the regular numerals and letters, it should be:
-1.jpg
_1.jpg
1.jpg
Dash, ASCII 45, comes before underscore, ASCII 95. Both come before the numeral one.
|
|
|
Posts:
3,950
Registered:
4-Aug-2006
|
|
|
|
Re: JAlbum image sort order with underscore
Posted:
10 Jul 25, 23:20
in response to: JeffTucker
|
|
|
|
I merely threw it in as a simple trial, rather than embedding the underscore and minus within the file name. If Finder and File Explorer don't have the same result my conclusion would be it is arbitrary, there is no 'right way'.
In the old old days (ten years ago), a leading underscore in the file name resulted in the file being excluded.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|