this post was submitted on 24 Apr 2025
196 points (97.1% liked)
Comic Strips
16181 readers
1314 users here now
Comic Strips is a community for those who love comic stories.
The rules are simple:
- The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author's website, for instance).
- The comic must be a complete story.
- If it is an external link, it must be to a specific story, not to the root of the site.
- You may post comics from others or your own.
- If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
- The comic can be in any language, but if it's not in English, OP must include an English translation in the post's 'body' field (note: you don't need to select a specific language when posting a comic).
- Politeness.
- Adult content is not allowed. This community aims to be fun for people of all ages.
Web of links
- !linuxmemes@lemmy.world: "I use Arch btw"
- !memes@lemmy.world: memes (you don't say!)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Assuming that the leading number and period is part of the filename:
If the directory-browsing thing supports natural sorting of numbers, you can use that; this will detect numbers within the filename and sort by them. For example, I use emacs's dired to browse directories and play movies. It can modify the flags passed to
ls
, andls
supports natural sorting of numbers in filenames with the-v
flag. Doing this in dired meansC-u s v RET
, and the directory will be displayed sorted numerically.If the directory-browsing thing doesn't support that, rename to a "0"-padded format such that a lexicographic order has the same ordering as numeric order:
That way,
will become
and so forth, and so software that can only do lexicographic orderings is happy.
If the leading number and period isn't part of the filename, then we need to parse human-language strings.
That'll rename to the format mentioned above in option 2:
will become
And lexicographic sorting will work.
You know what, I'll just manually rename the files
This is why I love Lemmy. There's a meme post and then someone writes a 7 page long technical solution like they were paid contributor at stack overflow.
Never change <3
Wow is it really that simple? I wonder why not everybody does that! 🤣
The first case is the most-likely for most people, and the simplest to do. Most directory browsers do support numeric sorting.
In the second case, I provided a Perl program in another comment in the thread that provides a generic way to do this with one command for nearly all files of this sort.
The third case, where human-language stuff needs to be parsed, true enough, doesn't just have a button to push.
That may be true for terminal applications, but even on Linux most GUI file browsers don't support that, at least not out of the box.
It looks like all of the Windows File Explorer, MacOS Finder, GNOME Files (nee Nautilus), and KDE Dolphin can. I suspect that that covers the overwhelming majority of users.