cleaner data sets

This commit is contained in:
Martin Gasque 2024-04-08 12:30:31 +02:00
parent 8241967ab6
commit 9b89d7d7b0
3 changed files with 34044 additions and 0 deletions

28
scripts/concatFiles.py Normal file
View File

@ -0,0 +1,28 @@
import os
import json
# Directory path
directory = './'
# Output file path
output_file = './concat.js'
# List to store JSON data
json_data = []
# Iterate over files in the directory
for filename in os.listdir(directory):
if filename.endswith('.json'):
file_path = os.path.join(directory, filename)
try:
with open(file_path, 'r') as file:
data = json.load(file)
if data.get('type') == 'spell':
json_data.append(data)
except Exception as e:
print(f"Error reading file {file_path}: {str(e)}")
# Write the concatenated JSON data to the output file
with open(output_file, 'w') as file:
json.dump(json_data, file)

16124
src/data/dataFiltered.js Normal file

File diff suppressed because one or more lines are too long

17892
src/data/dataSorted.js Normal file

File diff suppressed because one or more lines are too long