mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-11-18 06:09:01 -05:00
42 lines
9.4 KiB
Python
42 lines
9.4 KiB
Python
import os
|
|
import json
|
|
from json import JSONDecodeError
|
|
|
|
# Define the path to the species folder
|
|
species_folder = '../common/src/main/resources/data/cobblemon/species/'
|
|
|
|
# Define the Pokemon names mentioned in the PokemonModelRepository
|
|
pokemon_names_in_repository = ['bulbasaur', 'ivysaur', 'venusaur', 'charmander', 'charmeleon', 'charizard', 'squirtle', 'wartortle', 'caterpie', 'metapod', 'butterfree', 'weedle', 'kakuna', 'beedrill', 'rattata', 'raticate', 'rattata_alolan', 'raticate_alolan', 'eevee', 'magikarp', 'gyarados', 'pidgey', 'pidgeotto', 'pidgeot', 'diglett', 'dugtrio', 'zubat', 'cleffa', 'clefable', 'clefairy', 'krabby', 'paras', 'parasect', 'mankey', 'primeape', 'oddish', 'gloom', 'vileplume', 'bellossom', 'voltorb', 'electrode', 'lapras', 'ekans', 'machop', 'machoke', 'machamp', 'abra', 'aerodactyl', 'alakazam', 'arbok', 'arcanine', 'articuno', 'bellsprout', 'chansey', 'cloyster', 'crobat', 'cubone', 'dewgong', 'ditto', 'dodrio', 'doduo', 'dragonair', 'dragonite', 'dratini', 'drowzee', 'electabuzz', 'exeggcute', 'exeggutor', 'exeggutor_alolan', 'farfetchd', 'farfetchd_galarian', 'fearow', 'flareon', 'gastly', 'gastly_shiny', 'gengar', 'geodude', 'golbat', 'goldeen', 'golduck', 'golem', 'graveler', 'grimer', 'growlithe', 'haunter', 'hitmonchan', 'hitmonlee', 'horsea', 'hypno', 'jigglypuff', 'jolteon', 'jynx', 'kabuto', 'kabutops', 'kadabra', 'kangaskhan', 'kingler', 'koffing', 'krabby', 'lickitung', 'magmar', 'magnemite', 'magneton', 'marowak', 'meowth', 'mew', 'mewtwo', 'moltres', 'mrmime', 'muk', 'nidoking', 'nidoqueen', 'nidoranf', 'nidoranm', 'nidorina', 'nidorino', 'ninetales', 'omanyte', 'omastar', 'onix', 'persian', 'pikachu', 'pinsir', 'poliwag', 'poliwhirl', 'poliwrath', 'politoed', 'ponyta', 'porygon', 'psyduck', 'raichu', 'raichu_alolan', 'rapidash', 'rhydon', 'rhyhorn', 'sandshrew', 'sandslash', 'scyther', 'seadra', 'seaking', 'seel', 'shellder', 'slowbro', 'slowpoke', 'snorlax', 'spearow', 'starmie', 'staryu', 'steelix', 'tangela', 'tauros', 'tentacool', 'tentacruel', 'vaporeon', 'venomoth', 'venonat', 'victreebel', 'vulpix', 'weepinbell', 'weezing', 'wigglytuff', 'zapdos', 'elekid', 'igglybuff', 'magby', 'pichu', 'smoochum', 'tyrogue', 'hitmontop', 'electivire', 'glaceon', 'happiny', 'leafeon', 'lickilicky', 'magmortar', 'magnezone', 'mimejr', 'munchlax', 'porygon2', 'porygonz', 'rhyperior', 'scizor', 'tangrowth', 'sylveon', 'umbreon', 'espeon', 'blissey', 'kingdra', 'piloswine', 'quagsire', 'slowking', 'swinub', 'wooper', 'wooper_paldean', 'yanma', 'blaziken', 'combusken', 'marshtomp', 'minun', 'mudkip', 'plusle', 'rayquaza', 'swampert', 'torchic', 'bibarel', 'bidoof', 'buneary', 'empoleon', 'lopunny', 'mamoswine', 'pachirisu', 'piplup', 'prinplup', 'yanmega', 'basculin', 'crustle', 'dwebble', 'emolga', 'maractus', 'bounsweet', 'dartrix', 'decidueye', 'incineroar', 'litten', 'mimikyu', 'naganadel', 'poipole', 'rowlet', 'steenee', 'torracat', 'tsareena', 'centiskorch', 'sizzlipede', 'kleavor', 'pyukumuku', 'deerling', 'sawsbuck', 'sableye', 'natu', 'xatu', 'wailmer', 'wailord', 'murkrow', 'honchkrow', 'nacli', 'naclstack', 'garganacl', 'dhelmise', 'alcremie', 'milcery', 'turtwig', 'grotle', 'torterra', 'torterra_cherry', 'xerneas', 'klink', 'klang', 'klinklang', 'morelull', 'shiinotic', 'joltik', 'galvantula', 'riolu', 'lucario', 'treecko', 'grovyle', 'sceptile', 'honedge', 'spiritomb', 'baltoy', 'claydol', 'chespin', 'quilladin', 'chesnaught', 'elgyem', 'beheeyem', 'gible', 'gabite', 'garchomp', 'pineco', 'forretress', 'doublade', 'aegislash', 'lotad', 'lombre', 'ludicolo', 'golett', 'golurk', 'stantler', 'wyrdeer', 'sneasel', 'weavile', 'bergmite', 'avalugg', 'misdreavus', 'mismagius', 'whismur', 'loudred', 'exploud', 'luvdisc', 'cryogonal', 'sigilyph', 'pumpkaboo', 'gourgeist', 'eiscue', 'tatsugiri', 'wooloo', 'dubwool', 'chimchar', 'monferno', 'infernape', 'popplio', 'brionne', 'primarina', 'spinda', 'seedot', 'nuzleaf', 'shiftry', 'kricketot', 'kricketune', 'heatmor', 'durant', 'carvanha', 'sharpedo', 'mawile', 'walkingwake', 'ironleaves', 'miltank', 'torkoal', 'fennekin', 'braixen', 'delphox', 'froakie', 'frogadier', 'greninja', 'tepig', 'pignite', 'emboar', 'grookey', 'thwackey', 'rillaboom', 'scorbunny', 'raboot', 'cinderace', 'sobble', 'drizzile', 'inteleon', 'oshawott', 'dewott', 'samurott', 'snivy', 'servine', 'serperior', 'slugma', 'magcargo', 'slugma_shiny', 'magcargo_shiny', 'nosepass', 'probopass', 'chinchou', 'clamperl', 'huntail', 'gorebyss', 'spinarak', 'ariados', 'shuckle', 'taillow', 'swellow', 'relicanth', 'mudbray', 'mudsdale', 'comfey', 'tandemaus', 'maushold', 'mausholdfour', 'varoom', 'revavroom', 'lanturn', 'chingling', 'chimecho', 'fidough', 'dachsbun', 'chatot', 'gligar', 'gliscor', 'poochyena', 'mightyena', 'sprigatito', 'floragato', 'meowscarada', 'shroomish', 'breloom', 'charcadet', 'armarouge', 'ceruledge', 'flittle', 'espathra', 'surskit', 'masquerain', 'cutiefly', 'ribombee', 'carnivine', 'falinks', 'stufful', 'bewear', 'scatterbug', 'spewpa', 'vivillon', 'barboach', 'whiscash', 'combee', 'vespiquen', 'lillipup', 'herdier', 'stoutland', 'sirfetchd', 'rookidee', 'corvisquire', 'corviknight', 'duskull', 'dusclops', 'dusknoir', 'nickit', 'thievul', 'cacnea', 'cacturne', 'glimmet', 'glimmora', 'bonsly', 'sudowoodo', 'bouffalant', 'cetoddle', 'cetitan', 'venipede', 'whirlipede', 'scolipede', 'aipom', 'ambipom', 'hoothoot', 'noctowl', 'wingull', 'pelipper', 'shinx', 'luxio', 'luxray', 'numel', 'camerupt', 'vulpix_alolan', 'ninetales_alolan', 'roggenrola', 'boldore', 'gigalith', 'yamask', 'cofagrigus', 'mareep', 'flaaffy', 'ampharos', 'patrat', 'watchog', 'skrelp', 'dragalge', 'bunnelby', 'diggersby', 'arrokuda', 'barraskewda', 'shroodle', 'grafaiai', 'squawkabilly', 'annihilape', 'ponyta_galarian', 'rapidash_galarian', 'volbeat', 'illumise', 'yamper', 'boltund', 'tinkatink', 'tinkatuff', 'tinkaton', 'fuecoco', 'crocalor', 'skeledirge', 'quaxly', 'quaxwell', 'quaquaval', 'snubbull', 'granbull', 'maschiff', 'mabosstiff', 'phanpy', 'donphan', 'buizel', 'floatzel', 'zigzagoon', 'linoone', 'zigzagoon_galarian', 'linoone_galarian', 'obstagoon', 'cottonee', 'whimsicott', 'wishiwashi_solo', 'wishiwashi_schooling', 'meowth_alolan', 'meowth_galarian', 'persian_alolan', 'perrserker', 'starly', 'staravia', 'staraptor', 'komala', 'phantump', 'trevenant', 'totodile', 'croconaw', 'feraligatr', 'cyndaquil', 'quilava', 'typhlosion', 'chikorita', 'bayleef', 'meganium', 'fletchling', 'fletchinder', 'talonflame', 'crabrawler', 'crabominable', 'wimpod', 'golisopod', 'nincada', 'ninjask', 'shedinja', 'ralts', 'kirlia', 'gardevoir', 'gallade', 'beldum', 'metang', 'metagross', 'ursaluna', 'lechonk', 'oinkologne', 'pidove', 'tranquill', 'unfezant', 'timburr', 'gurdurr', 'conkeldurr', 'clodsire', 'teddiursa', 'ursaring', 'litwick', 'lampent', 'chandelure', 'gimmighoulroaming', 'gimmighoulchest', 'gholdengo', 'drifloon', 'drifblim', 'lileep', 'cradily', 'tirtouga', 'carracosta', 'arctovish', 'dracovish', 'arctozolt', 'dracozolt', 'shieldon', 'bastiodon', 'cranidos', 'rampardos', 'basculegion', 'tyrunt', 'tyrantrum', 'anorith', 'armaldo', 'archen', 'archeops', 'aron', 'lairon', 'aggron', 'hippopotas', 'hippowdon', 'zorua', 'zorua_hisuian', 'zoroark', 'zoroark_hisuian', 'gossifleur', 'eldegoss', 'amaura', 'aurorus', 'voltorb_hisuian', 'electrode_hisuian', 'sentret', 'furret', 'qwilfish', 'qwilfish_hisuian', 'overqwil', 'sneasel_hisuian', 'sneasler', 'tropius', 'petilil', 'lilligant', 'petilil_hisuian', 'lilligant_hisuian', 'darumaka', 'darmanitan', 'darmanitan_zen', 'turtonator', 'stonjourner', 'cufant', 'copperajah', 'budew', 'roselia', 'roserade', 'solrock', 'lunatone', 'woobat', 'swoobat', 'sandile', 'krokorok', 'krookodile', 'frillish_male', 'frillish_female', 'jellicent_male', 'jellicent_female', 'cubchoo', 'beartic', 'deino', 'zweilous', 'hydreigon', 'larvesta', 'volcarona', 'fomantis', 'lurantis', 'dreepy', 'drakloak', 'dragapult', 'diglett_alolan', 'dugtrio_alolan', 'makuhita', 'hariyama', 'alomomola', 'ferroseed', 'ferrothorn', 'flabebe', 'floette', 'florges', 'carbink', 'goomy', 'goomy_hisuian', 'sliggoo', 'sliggoo_hisuian', 'goodra', 'goodra_hisuian', 'heracross', 'skarmory', 'salandit', 'salazzle', 'jangmo-o', 'hakamo-o', 'kommo-o']; # Update this list based on the actual PokemonModelRepository
|
|
|
|
# Initialize an empty list to store the files that meet the criteria
|
|
files_meeting_criteria = []
|
|
files_not_meeting_criteria = []
|
|
|
|
# Iterate over all the files in the species folder
|
|
for root, dirs, files in os.walk(species_folder):
|
|
for file in files:
|
|
# Check if the file is a JSON file
|
|
if file.endswith('.json'):
|
|
#print(file)
|
|
# Open and parse the JSON file
|
|
with open(os.path.join(root, file), 'r', encoding='utf-8') as f:
|
|
try:
|
|
data = json.load(f)
|
|
except JSONDecodeError as exception:
|
|
print(f"Error decoding JSON for file: {file}")
|
|
print(exception)
|
|
continue
|
|
|
|
# Check if the "implemented" key is present and if its value is not true
|
|
if 'implemented' not in data or data['implemented'] != True:
|
|
# Check if the Pokemon name is mentioned in the PokemonModelRepository
|
|
if (data['name']).lower() in pokemon_names_in_repository:
|
|
# If all conditions are met, add the file to the list of files that meet the criteria
|
|
files_not_meeting_criteria.append(file)
|
|
|
|
# Print the files that are not marked as implemented but should be
|
|
for file in files_not_meeting_criteria:
|
|
print(file)
|
|
|
|
print('Done!')
|