Created
February 1, 2022 18:15
-
-
Save polluterofminds/5cba0dcd796dce0fbf30611fea1164d9 to your computer and use it in GitHub Desktop.
metadata_generator.js
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
const fs = require('fs'); | |
const imageDir = fs.readdirSync("./Pinnies"); | |
imageDir.forEach(img => { | |
const metadata = { | |
name: `Pinnie ${img.split(".")[0]}`, | |
description: "A Pinnie in the Limited Pinata Family Collection", | |
image: `ipfs://FOLDER_CID/${img.split(".")[0]}.png`, | |
attributes: [] | |
} | |
fs.writeFileSync(`./metadata/${img.split(".")[0]}`, JSON.stringify(metadata)) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment