custom sorting method for a single directory
See original GitHub issueFirst of all, thanks for the great package. It is really helpful and has given to me and my family many happy moments.
Feature description I’m trying to figure out a way to apply custom sorting method on root directory. For me, the most obvious way to browse a picture gallery is having the latest folders on top in the root directory and the files/folder inside each folder sorted by ascending date.
Proposed solution
A specific directory should have a way to override the general settings for sorting methods. I think the best (simplest) way would be by having a hidden file (ex. .order_descending_name
).
More info on my solution
I have all my pictures in folders with prepending date, (ex. 2010.09.02 John's wedding
). Sorting the root directory by descending name is the absolutely best approach for the gallery root; recent events are on top.
But, if I set that method to settings, photos inside each folder are in reverse order, having the latest on top, which is not helpful.
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Alright. I had some time and added this functionality. 😃 Here you can see how it works: https://github.com/bpatrik/pigallery2/blob/73a8c4202a9d4fd7746e080a339c0fa644d4b32f/src/common/PG2ConfMap.ts#L10-L14
Basically, you add an empty file like
.order_descending_name.pg2conf
to a folder and that overrides the default sorting for that folder.No, it only works in a given folder.