Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3 letter or more suffix to directories instead of letter only when roms exceed letter directory limit #837

Closed
ddcruver opened this issue Nov 29, 2023 · 9 comments · Fixed by #900
Assignees
Labels
enhancement New feature or request

Comments

@ddcruver
Copy link

Is your feature request related to a problem?

A1, A2 is not very descriptive to finding roms, maybe more can be done to make it easier to find games.

Describe the solution you'd like

A separate parameter "--dir-letter-range-label" (or something similar) can be added to go along with existing properties:
--dir-letter Append the first letter of the ROM name as an output subdirectory [boolean]
--dir-letter-limit [int]

This parameter will instruct the directory name to be the 3 or more character range of the directory. So something like AAA-ADX, ADY-AMA, AMA-AZZ.

Additional context

No response

@ddcruver ddcruver added the enhancement New feature or request label Nov 29, 2023
@emmercm
Copy link
Owner

emmercm commented Nov 29, 2023

This makes sense. I've also thought about adding an option to group multiple letters together, as in:

A-F/
G-Q/
R-Z/

in the way that HTGD SMDBs do. My personal opinion is the single letters are more useful, but to each their own.

@ddcruver
Copy link
Author

I could see grouping single letters based on a different factor would be good feature to add as well. i.e. min roms for a directory to be listed alone (if the next one isn't a big one itself) that is a confusing rule but wouldn't want a little directory to be grouped with a big one. Only group adjacent small directories.

I would have a hard time remembering which directory I should navigate to A1, A2, A3, A4 to but it would be confusing if you wanted to hand your device to a friend to show way to big rom collection :)

@ddcruver
Copy link
Author

ddcruver commented Nov 29, 2023

I looked at your HTGD example afterword but even if you extended it a little it would be useful too, like A-G with all listed in there either single letters or the prefixes I mentioned as well. So you could easily get to Z with less clicks.

├───A-G
│ ├───A
│ │ ├───AA-AF
│ │ └───AG-AZ
│ ├───B
│ ├───C
│ ├───D
│ ├───E
│ ├───F
│ └───G
├───C-Q
└───R-Z

I know they don't add the single letter directories but when navigating on a handheld emulator with limited to no search capabilities/no keyboard, I believe it would be useful to have that.

@ddcruver
Copy link
Author

I don't have nearly enough time to implement it but if you could point me to the "directory determining" code I would like to see if I could take a shot at implementing a few methods of sorting over my vacation.

@emmercm
Copy link
Owner

emmercm commented Dec 4, 2023

Sorry, I typed out a nearly full response and never hit the send button...

In the case of SMDBs, you wouldn't want to use any of the --dir-letter* options, because it would produce confusing directory trees like you have there. I meant that it might be a good feature to be able to produce a similar directory structure for non-SMDB DATs, such as No-Intro ones. SMDBs also sort by category, so that part wouldn't be possible with other DATs.


I started working on this on a plane yesterday, I'm proposing two new options:

  • --dir-letter-count <number=1> which lets you control how many leading letters to use, right now it's only the first letter
  • --dir-letter-group which will let you group ROMs into range folders like you're proposing here, and it will require --dir-letter-limit

@ddcruver
Copy link
Author

ddcruver commented Dec 4, 2023

An alternative idea would just be to increase the letter count of the ranges for each sub directory, unless a single item of the parent directory range would have less than the limit. I don't think you would like how that would end up because it would be similar to my example.

You may never have something ranges with of more then 4 letters unless you had a dir-letter-limit set too low and/or there was you had a game with lots of sequals, versions, languages. Maybe a letter count limit would make more sense where it would ignore the dir-letter-limit if the case was hit. I just don't like the ideal of a MARIO 1, MARIO 2 directories.

@emmercm
Copy link
Owner

emmercm commented Dec 7, 2023

Agreed, a --dir-letter-count of larger than about 3 probably doesn't make sense, but people could do it if they want.

I'm not sure I fully understood your response, it was fairly dense with information. So I'll restate what I'm thinking and see if it makes sense to you.


igir [commands..] --dir-letter --dir-letter-limit 1000 --dir-letter-group

would create subdirectories with 1,000 ROMs each, which might result in something like:

A-F/
G-Q/
R-Z/

and then the number of letters could be controlled like this:

igir [commands..] --dir-letter --dir-letter-limit 1000 --dir-letter-group --dir-letter-count 3

to produce something like you had in the first post:

AAA-FOO/
FOP-QUA/
QUB-ZZZ/

@emmercm
Copy link
Owner

emmercm commented Feb 1, 2024

Feature implemented in #900.

Copy link

github-actions bot commented Mar 4, 2024

🔒 Inactive issue lock

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Comment generated by the GitHub Lock Issues workflow.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants