Date-based hierarchical asset dir#1094
Open
hkclark wants to merge 1 commit intosissbruecker:masterfrom
Open
Conversation
|
Nice, that's useful |
6047104 to
f6ea86e
Compare
Contributor
Author
|
@sissbruecker I just wanted to check on this PR and see if there was anything I could do on my end to have this be something you would consider merging into main? I have been running this on my instance since mid-June and it has been working well. It shouldn't impact any existing assets... they stay as is... it just adds the subdirectories to any new entries and helps prevent having too many files in a single directory. I have found it very useful and thought others might as well. Thanks & regards. |
|
agreed this would be useful, but it looks like there are lots of PR's that haven't been accepted :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have over 50,000 bookmarks and storing that many in a single asset directory and storing that many asset files in a single directory doesn't seem ideal. This PR adds to
_generate_asset_filename()the feature where it add{year}/{month}to the front of the filename and creates the directory/directories if they don't exist. In all of my testing it's backward compatible... it leaves any existing assets as-is and just starts putting new assets into the "hierarchical" structure. The tests have been updated as well.Thank you