LANraragi icon indicating copy to clipboard operation
LANraragi copied to clipboard

Create categories only by the top level subfolder

Open Enrique-Venegas-A opened this issue 1 year ago • 1 comments

Please describe your suggestion, and the problem it'd solve. When using the "Subfolders to Categories" script, an option to create them only by the top folders would be great to separate content by origin.

image

With the current behavior a category would be created for "F1, F2 .. F9", my proposition would be to be able to choose between that or to create categories only for the top level "D11, D12, D13 and D14".

In my own gallery I currently have a folder for site1 and another for site2, in one of those, the files are stored in separated folders by authors, in the other one, all of them are just there. This produces an inconsistent set of tags that quickly becomes unusable and unmanageable when you have hundreds/thousands of files/folders.

Enrique-Venegas-A avatar Aug 23 '22 20:08 Enrique-Venegas-A

The current FolderToCat script uses find to drill down into the directory tree, adding files as it finds them using their parent folder.

Implementing this issue would probably require a variant of the algorithm, using finddepth instead to drill all the way down first, then go back up adding all the files under their most ancient subfolder.
Not particularly difficult, but slightly tricky!

Difegue avatar Sep 06 '22 21:09 Difegue