Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Make list of items from NEI dump
- # You will have to remove the last trailing comma
- # and add the items = {} part
- IDDump = open("IDDump.txt","r") # IDDump from NEI
- f = open("listdump.txt", "a")
- for index, key in enumerate(IDDump.readlines()):
- try:
- index = index + 1
- temp = key.split(" ")
- if temp[1] == "Unused":
- pass
- else:
- temp = temp[2]
- temp = temp.rstrip(".")
- f.write('[' + str(index) + ']' + '="' + temp + '",\n')
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment