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

Split Download Folder Into Several Sub-Dirs If There Are Lot of Icons #14

Open
LeeThompson opened this issue May 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@LeeThompson
Copy link
Contributor

Split the download dir into several sub-dirs (MD5 segment of filename e.g. /af/cd/example.com.png) if there are a lot of favicons.

@gaffling How did you want this to work?

My general thought is if the number of requested icons > the threshold set by default, ini or switch then instead of just using local_path it will create sub-folders based on fragments of the md5 hashes of the icons for saving.

Although it might be better if it was alpha based on the domain name, like "microsoft" would go in "m/microsoft.com.ico". Perhaps there could be multiple threshold levels so perhaps "mi/microsoft.com.ico" if there are a crazy number.

@gaffling
Copy link
Owner

I have done such a thing before and I would split the first 2 chars of the filename and then check if a folder like this exists and if not build it and save the file ;-)

And yes, use the complete domain as a filename seems to be a good idea!

@gaffling gaffling added the enhancement New feature or request label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants