HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.17k stars 4.3k forks source link

Is _metadata.json important? #973

Open thrillex123 opened 2 years ago

thrillex123 commented 2 years ago

Is it important to have this in the json directory? I'm replacing a few files within my collection and i don't want to manually edit _metadata.json to reflect the new metadata. Can i simply remove it? Is there another way to generate it given all the .json files?

bolshoytoster commented 2 years ago

@thrillex123 if you're manually editing the json, it's best to edit _metadata.json then run node utils/update_metadata.js to update the rest.

If you want, my fork's utils/update_metadata.js has support for getting the data from the individual files to generate the _metadata.json if it's deleted first.

thrillex123 commented 2 years ago

@bolshoytoster Would I be able to use your form for this workflow:

  1. delete _metadata.json
  2. drop new .json into the folder to replace a few #
  3. Run your update script from your fork.
bolshoytoster commented 2 years ago

@thrillex123 you should be able to.

thrillex123 commented 2 years ago

@bolshoytoster thanks!

just trying to understand your script. Does it go through the config and image files to do so? Why is this necessary if all the data is in the hundreds of .json files in the json directory?

bolshoytoster commented 2 years ago

@thrillex123 it goes through the json files, but the script is mainly for updating certain values (collection name etc.) so it loads them from src.config.js.