1
This commit is contained in:
parent
76a35f553d
commit
278436a5a6
47
scripts/export_market/export.py
Normal file
47
scripts/export_market/export.py
Normal file
@ -0,0 +1,47 @@
|
||||
import csv
|
||||
import json
|
||||
import datetime
|
||||
|
||||
mintTable = []
|
||||
nftTable = []
|
||||
nftTransferTable = []
|
||||
|
||||
contracts = lambda : json.load(open('contract.json', 'r'))
|
||||
|
||||
def exportMintTable():
|
||||
rows = []
|
||||
with open('mint.raw.csv', 'w', newline='') as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerows(rows)
|
||||
|
||||
def exportNftTable():
|
||||
rows = []
|
||||
with open('nft.raw.csv', 'w', newline='') as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerows(rows)
|
||||
|
||||
def exportNftTransferTable():
|
||||
rows = []
|
||||
with open('nft_transfer.raw.csv', 'w', newline='') as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerows(rows)
|
||||
|
||||
def exportNftSumTable():
|
||||
rows = []
|
||||
for nft in nftTable:
|
||||
rows.push(
|
||||
(
|
||||
nft['token_id'],
|
||||
nft['token_type'],
|
||||
nft['creator_address'],
|
||||
nft['owner_address'],
|
||||
nft['tags'],
|
||||
datetime.datetime.fromtimestamp(nft['modifytime'])
|
||||
)
|
||||
)
|
||||
with open('nft.sum.csv', 'w', newline='') as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerows(rows)
|
||||
|
||||
|
||||
print('hello')
|
Loading…
x
Reference in New Issue
Block a user