Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.35 KB

README.md

File metadata and controls

20 lines (15 loc) · 1.35 KB

Pinata toolkit in Python

This toolkit is for Pinata users who use Python.

Installation

  • this script is for batch uploading and pinning files to Pinata.
  • prepare data in a CSV file, one row one file, filename specified in the "filename" field, with any metadata.
  • copy the CSV file to the program directory
  • copy all the files to be uploaded to the "/upload" directory
  • run the command

python3 pinFileInCsv.py csvFile.csv keyLabel

  • the script will pin the files specified in the CSV row by row. If pinning successful, the returned hash will be written in the output file "out_[inputFilename]". The field will be left blank if pinning failed.
  • the input file does not need to have the "ipfsHash" field prepared in advance, the script will add this field automatically.
  • If the input file has the ipfsHash field in advance, however, the script will skip those records which already have hash value filled.