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

Adds a feature to merge multiple build folders. #1561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

two-pack
Copy link

Description

When we create an NFT collection, we may repeat the build several times. In doing so, we remove those with poor results and select the good ones.
This function merges the results of several builds.

Usage

First of all, if you have already installed HashLips, do npm install again.

The simplest method is to merge the build results in build_a, build_b, and build_c into the build folder.
NOTE: In this case, the contents of the original build folder will be deleted.

npm run merge -- -o build build_a build_b build_c

At this time, if there are items with the same DNA, the following message will be displayed and only the first one will be adopted.

Duplicated data:  /foo/bar/build_b/json/5.json

If you want to shuffle the order of the results after merging, add the -s option.

npm run merge -- -o build build_a build_b build_c -s

Help is also available.

npm run merge -- help

Example

$ npm run build
$ mv build build_a
$ npm run build
$ mv build build_b
$ npm run build
$ mv build build_c
$ npm run merge -- -o build build_a build_b build_c
Duplicated data:  /foo/bar/build_b/json/1.json
Merge done.
$ ls build/images
1.png   11.png  13.png  2.png  4.png  6.png  8.png
10.png  12.png  14.png  3.png  5.png  7.png  9.png
$ ls build/json
1.json   11.json  13.json  2.json  4.json  6.json  8.json  _metadata.json
10.json  12.json  14.json  3.json  5.json  7.json  9.json

Related issues

#1189

@Marcitpro
Copy link

Great post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants