-
Notifications
You must be signed in to change notification settings - Fork 7
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 --overwrite flag to rewrite every metadata json files #28
Conversation
This implements #19 |
@sk33z3r Should we make the default behavior to preserve metadata and have an --overwrite flag instead? |
Seems to feel more "user friendly" if you automatically overwrite so nothing is ever stale. I can't come up with an argument where you would want to keep the CID list stale like that, but I'm sure there is a use case I'm not thinking of. At the end of the day, I make a change to a file and try to mint, I don't expect to have to regen CID because it's sort of a hidden feature to the user right now. Might not be completely obvious that the CID calc was a step in the process. |
Agreed, in all cases, running metadata should always "refresh" at least the CIDs. I believe behavior c) to be less prone to data loss for users who manually edit their metadata after generation, while preventing stale CIDs for all users |
Changed the default behavior to only update CIDs |
Yea, I agree with that and a good move to make it default with this option. |
New
--preserve
flag for metadata.py.It will only update CIDs in the metadata.json files that exist.
If the json is not valid, it will print out an error, save a backup of the file (add
.bak
suffix) and regenerate a new metadata json file