A collection of python scripts which help you programatically create PNGs or GIFs

Overview

OpenSea PNG/GIF NFT Creator

Description

A collection of python scripts which help you programatically create PNGs or GIFs and their Metadata in bulk with custom rarity rates, upload them to OpenSea & list them for sale.

In /Generate/ is the generator script for programmatically creating images.

In /Upload/ there is an uploader script that logs into your OpenSea account via Selenium and metamask chrome plugin to bulk upload NFT to your collection. This part of the collection was customised from https://github.com/lakshyabatman/Bulk-uploader-NFT

Inside /List/ there are a set of scripts to help you grab all your collection links and metadata information so that you can then set a price in Eth within the AssetLinks.csv and list them for sale. This was quite a tricky issue to solve as there is no bulk sell feature in OpenSea but this does automate the listing process.

Whilst this is an easy, hands-off way of uploading/listing your NFTs it takes time and isn't as efficient as having API access. I might update some of the functionality to use OpenSea's API in the future but for now you may want to run the upload process over night when you don't need your machine.

I've created a few example assets/images for the purpose of demoing this project. Feel free to do what you like with them.

You can check out the OpenSea NFT collection I made with this project here: https://opensea.io/collection/ether-swimmers/

If this proves useful to you or you get NFT rich consider buying me a coffee:

Buy Me A Coffee

Before you get started

Accounts

  • Get a metamask wallet and the Chrome extension.
  • Sign up to OpenSea using a metamask wallet.

Install Requirements

  • pip install -r requirements.txt
  • Make sure you have chrome driver installed.
  • Create .env from .example.env with required keys.

Create your PNG assets

  • Create your assets and put them in folders within the /Assets/ folders.
  • Recommended image size is 300x300 but there is code to resize images automatically.
  • Rename your assets to numbers such as 1.png, 2.png, 3.png etc and put them in the right folders. This makes it easier to work with a dictionary to generate metadata.

Generating your NFTs

Configure the Generator Script

  • Follow the comments in the script.
  • Setup your dictionarys of asset information for NFT metadata.
  • Configure the image output for PNG/GIF.

Start generating

  • Open Execute.py and change the NumberOfNFTS.
  • Run the script.
  • The generator script will put strings of numbers into a GenerationIDs csv this is used to stop duplicate NFTs. If you need to rerun the generator from scratch, make sure to clear the IDs so that you aren't limited.
  • There will be a metadata JSON file for each image. These will need to be joined by running the MergeJson.py file in the /JSON/ folder. (This could probably be fixed to do automatically at the point of generation).
  • All your images should now be in OutputData/Images.

Uploading to OpenSea

Using UploadNFTs.py

Setup your .env file

  • EXTENSION_PATH: In our program, we're running a selenium based browser (chrome driver here) and usually in automated environment we don't have access to extensions, so get the access.
    • Navigate to chrome://extensions/ Click ‘Pack extension’ and enter the local path to the Metamask extension. This will generate a .crx file. Also, make a note of Extension ID.
    • Now the path to this '.crx' file is the value of this field.
  • RECOVERY_CODE: Recovery code of your wallet cause we need to login into your metamask.
  • PASSWORD: Metamask's password.
  • CHROME_DRIVER_PATH: To run chromium, you need to download the chrome driver and it's path will be the value. (https://chromedriver.chromium.org/downloads)

Note on metamask automation:

  • You have to click the "sign" button during user login on opensea for the first time.
  • Sometimes metamask wants additional "sign" auth on actions which when unattended can stop the scripts.
  • If it fails at any point just rerun, the code is designed to keep track of what has already been uploaded/listed and skip that.
  • You may find that when OpenSea's servers slow down (which happens a lot) this can affect Selenium's timings and cause errors as it tries to click things that don't exist. I've accounted for a fair bit of this behaviour but it doesn't account for every situation.

Setup your OpenSea Collection

  • You will need to input your OpenSea collection URL on line 98 & 134 of UploadNFTs.py. Create your OpenSea collection in your account and grab the link.

Run UploadNFTs.py

Listing for sale on OpenSea

This is long winded but worth it.

Run the scripts in the List folder in this order:

getUrls.py

  • Change the collection URL on line 74
  • This gets all (most) the URLs of the NFTs from the collection
  • This takes a while as it has to scroll through the page to overcome the infinite loader. The more images you have, the longer it'll take.
  • Important! - After you've run this do a Remove Duplicates operation in the CSV to get rid of any URLs which are duplicated.

getProperties.py

  • This gets all the Metadata attributes & their % rarity for the NFT URLs and throws them into AssetLinks.csv.

Important - Price your NFTs

  • Inside AssetLinks.csv add prices to your NFTs in Ethereum before runing

Run list.py

  • This should just run

Phew, you are done and now have a collection of shiny NFTs on OpenSea! Congrats

Owner
Tom
https://www.buymeacoffee.com/tomhar
Tom
Cat avatars for adult independent users

Cat avatars for adult independent users Samples (Natasha, wake up!) Usage Check values from https://shantichat.github.io/avacats/index.json: { "sizes"

4 Nov 05, 2021
Python Image Optimizer Script

Image-Optimizer Download and Install git clone https://github.com/stefankumpan/Image-Optimizer-Script.git cd Image-Optimizer-Script pip install -r req

Stefan Kumpan 0 Jul 15, 2021
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

1 Nov 09, 2021
Fix datetime EXIF data in photos downloaded from Google Takeout

fix-google-takeout Warning Use at your own risk. Backup your photos. Overview Google takeout for photos

Mayank Mandava 20 Nov 05, 2022
A Python3 library to generate dynamic SVGs

The Python library for generating dynamic SVGs using Python3

1 Dec 23, 2021
Conversion of Image, video, text into ASCII format

asciju Python package that converts image to ascii Free software: MIT license

Aju Tamang 11 Aug 22, 2022
Easy to use Python module to extract Exif metadata from digital image files.

Easy to use Python module to extract Exif metadata from digital image files.

ianaré sévi 719 Jan 05, 2023
Napari plugin for iteratively improving 3D instance segmentation of cells (u-net x watershed)

iterseg napari plugin for iteratively improving unet-watershed segmentation This napari plugin was generated with Cookiecutter using @napari's cookiec

Abigail McGovern 3 May 16, 2022
A QR Code encode and decode python module

A QR Code encode and decode python module

Fayas Noushad 4 Feb 10, 2022
HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.

A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features

Danish 24 Dec 14, 2022
Python binding to Skia Graphics Library

Skia python binding Python binding to Skia Graphics Library. Binding based on pybind11. Currently, the binding is under active development. Install Bi

Kota Yamaguchi 170 Jan 06, 2023
Convert HDR photos taken by iPhone 12 (or later) to regular HDR images

heif-hdrgainmap-decode Convert HDR photos taken by iPhone 12 (or later) to regular HDR images. Installation First, make sure you have the following pa

Star Brilliant 5 Nov 13, 2022
Pixel Brush Processing Unit

Pixel Brush Processing Unit The Pixel Brush Processing Unit (PBPU for short) is a simple 4-Bit CPU I designed in Logisim while I was still in school a

Pixel Brush 2 Nov 03, 2022
CadQuery is an intuitive, easy-to-use Python module for building parametric 3D CAD models.

A python parametric CAD scripting framework based on OCCT

1.9k Dec 30, 2022
Image Processing HighPass Filter With Python

Image_Processing_HighPassFilter High Pass Filter take the high frequency and ignore the low frequency High Pass Filter can be use to sharpening an ima

Felix Pratamasan 1 Dec 27, 2021
GPU-accelerated image processing using cupy and CUDA

napari-cupy-image-processing GPU-accelerated image processing using cupy and CUDA This napari plugin was generated with Cookiecutter using with @napar

Robert Haase 16 Oct 26, 2022
A tool to maintain an archive/mirror of your Google Photos library for backup purposes.

Google Photos Archiver Updated Instructions 8/9/2021 Version 2.0.6 Instructions: Download the script (exe or python script listed below) Follow the in

Nick Dawson 116 Jan 03, 2023
Python Image Morpher (PIM) is a program that can take two images and blend them to whatever extent or precision that you like

Python Image Morpher (PIM) is a program that can take two images and blend them to whatever extent or precision that you like! It is designed to emulate some of Python's OpenCV image processing from

David Dowd 108 Dec 19, 2022
display: a browser-based graphics server

display: a browser-based graphics server Installation Quick Start Usage Development A very lightweight display server for Torch. Best used as a remote

Szymon Jakubczak 205 Oct 17, 2022
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 2022