<commit_before># data in the form of: ID,FullName,AssetPackageName,AsciiLabel,PackID,Quality,UnlockMethod

dump_file = input('Data dump (input) file name?->')
data = open(dump_file, 'r', encoding='utf-8-sig')
Bodies,Wheels,Boosts,Antennas,Decals,Toppers,Trails,Goal_Explosions,Paints,Banners,Engine_Audio=[],[],[],[],[],[],[],[],[],[],[]

car_dict = {'backfire': 'Backfire', 'force': 'Breakout', 'octane': 'Octane', 'orion': 'Paladin', 'rhino': 'Road Hog',
'spark': 'Gizmo', 'torch': 'X-Devil', 'torment': 'Hotshot', 'vanquish': 'Merc', 'venom': 'Venom',
'import': 'Takumi', 'musclecar': 'Dominus', 'zippy': 'Zippy', 'scarab': 'Scarab', 'interceptor': 'Ripper',
'wastelandtruck': 'Grog', 'musclecar2': 'Dominus GT', 'torch2': 'X-Devil Mk2', 'neocar': 'Masamune',
'rhino2': 'Road Hog XL', 'takumi': 'Takumi RX-T', 'aftershock': 'Aftershock', 'neobike': 'Esper',
'marauder': 'Marauder', 'carcar': 'Breakout Type-S', 'number6': 'Proteus', 'cannonboy': 'Triton',
'o2': 'Octane ZSR', 'gilliam': 'Vulcan', 'bone': 'Bone Shaker', 'scallop': 'Twin Mill III', 'endo': 'Endo',
'charged': 'Ice Charger', 'flatbread': 'Mantis', 'pumpernickel': 'Centio V17', 'focaccia': 'Animus GP',
'challah': "'70 Dodge Charger R/T", 'melonpan': "'99 Nissan Skyline GT-R R34", 'levain': 'Werewolf',
'greycar': 'DeLorean Time Machine', 'interceptor': 'Interceptor_SF', 'darkcar': "'16 Batmobile",
'takumi_ii': 'Takumi RX-T', 'sourdough': 'Jäger 619 RS', 'multigrain': 'Imperator DT5',
'berry': 'The Dark Knight Rises Tumbler', 'eggplant': "'89 Batmobile", 'Universal Decal': 'Universal Decal'}

for line in data:
    line = line.lower()
    line_parts = line.split(',')
    ID = line_parts[0]
    FullName = line_parts[1]
    AssetPackageName = line_parts[2]
    AsciiLabel = line_parts[3]
    PackID = line_parts[4]
    Quality = line_parts[5]
    UnlockMethod = line_parts[6]
    #if it is platform specific, logo for season play, crate, bots, keys, packs
    if (ID=='0' or AssetPackageName == 'seasonlogos' or
    AssetPackageName == 'itemcontainer' or
    AssetPackageName == 'bots' or
    'key' in AssetPackageName or
    'pack' in AssetPackageName):
        continue
    elif 'body' in FullName:
        body = ('{:4} - {}'.format(ID,AsciiLabel))
        Bodies.append(body)
    elif 'skin' in FullName:
        car=AssetPackageName.split('_')
        if len(car) <= 2:
            car = 'Universal Decal'
        else:
            car = car[1]
        skin = ('{:4} - {} - {}'.format(ID,AsciiLabel,car_dict[car]))
        Decals.append(skin)
    elif 'engineaudio' in FullName:
        engineaudio = ('{:4} - {}'.format(ID,AsciiLabel))
        Engine_Audio.append(engineaudio)
    elif 'flag' in FullName or 'antenna' in FullName or 'pennant' in FullName or '.at' in FullName:
        antenna = ('{:4} - {}'.format(ID,AsciiLabel))
        Antennas.append(antenna)
    elif 'playerbanner' in FullName:
        playerbanner = ('{:4} - {}'.format(ID,AsciiLabel))
        Banners.append(playerbanner)
    elif 'wheel' in FullName:
        wheel = ('{:4} - {}'.format(ID,AsciiLabel))
        Wheels.append(wheel)
    elif 'boost' in FullName:
        boost = ('{:4} - {}'.format(ID,AsciiLabel))
        Boosts.append(boost)
    elif 'explosion' in FullName:
        explosion = ('{:4} - {}'.format(ID,AsciiLabel))
        Goal_Explosions.append(explosion)
    elif 'hat' in FullName or 'crown' in FullName:
        hat = ('{:4} - {}'.format(ID,AsciiLabel))
        Toppers.append(hat)
    elif 'paintfinish' in FullName:
        paintfinish = ('{:4} - {}'.format(ID,AsciiLabel))
        Paints.append(paintfinish)
    elif 'ss' in FullName: #trails
        trail = ('{:4} - {}'.format(ID,AsciiLabel))
        Trails.append(trail)
    else:
        print('unassigned:\n',line_parts)

file_name = input('Clean file (output) name(with "".txt")->')
clean_file = open(file_name, 'w')


clean_file.write('### ID - AsciiLabel\n\n')
clean_file.write('### Bodies\n```\n')
for body in Bodies:
    clean_file.write(body)
    clean_file.write('\n')

clean_file.write('```\n\n### Boosts\n```\n')
for boost in Boosts:
    clean_file.write(boost)
    clean_file.write('\n')

clean_file.write('```\n\n### Antennas\n```\n')
for antenna in Antennas:
    clean_file.write(antenna)
    clean_file.write('\n')

clean_file.write('```\n\n### Decals\n```\n')
for skin in Decals:
    clean_file.write(skin)
    clean_file.write('\n')

clean_file.write('```\n\n### Toppers\n```\n')
for hat in Toppers:
    clean_file.write(hat)
    clean_file.write('\n')

clean_file.write('```\n\n### Trails\n```\n')
for trail in Trails:
    clean_file.write(trail)<commit_msg>Added Wheels to item parser<commit_after># data in the form of: ID,FullName,AssetPackageName,AsciiLabel,PackID,Quality,UnlockMethod

dump_file = input('Data dump (input) file name?->')
data = open(dump_file, 'r')
Bodies,Wheels,Boosts,Antennas,Decals,Toppers,Trails,Goal_Explosions,Paints,Banners,Engine_Audio=[],[],[],[],[],[],[],[],[],[],[]

car_dict = {'backfire': 'Backfire', 'force': 'Breakout', 'octane': 'Octane', 'orion': 'Paladin', 'rhino': 'Road Hog',
'spark': 'Gizmo', 'torch': 'X-Devil', 'torment': 'Hotshot', 'vanquish': 'Merc', 'venom': 'Venom',
'import': 'Takumi', 'musclecar': 'Dominus', 'zippy': 'Zippy', 'scarab': 'Scarab', 'interceptor': 'Ripper',
'wastelandtruck': 'Grog', 'musclecar2': 'Dominus GT', 'torch2': 'X-Devil Mk2', 'neocar': 'Masamune',
'rhino2': 'Road Hog XL', 'takumi': 'Takumi RX-T', 'aftershock': 'Aftershock', 'neobike': 'Esper',
'marauder': 'Marauder', 'carcar': 'Breakout Type-S', 'number6': 'Proteus', 'cannonboy': 'Triton',
'o2': 'Octane ZSR', 'gilliam': 'Vulcan', 'bone': 'Bone Shaker', 'scallop': 'Twin Mill III', 'endo': 'Endo',
'charged': 'Ice Charger', 'flatbread': 'Mantis', 'pumpernickel': 'Centio V17', 'focaccia': 'Animus GP',
'challah': "'70 Dodge Charger R/T", 'melonpan': "'99 Nissan Skyline GT-R R34", 'levain': 'Werewolf',
'greycar': 'DeLorean Time Machine', 'interceptor': 'Interceptor_SF', 'darkcar': "'16 Batmobile",
'takumi_ii': 'Takumi RX-T', 'sourdough': 'Jäger 619 RS', 'multigrain': 'Imperator DT5',
'berry': 'The Dark Knight Rises Tumbler', 'eggplant': "'89 Batmobile", 'Universal Decal': 'Universal Decal'}

for line in data:
    line = line.lower()
    line_parts = line.split(',')
    ID = line_parts[0]
    FullName = line_parts[1]
    AssetPackageName = line_parts[2]
    AsciiLabel = line_parts[3]
    PackID = line_parts[4]
    Quality = line_parts[5]
    UnlockMethod = line_parts[6]
    #if it is platform specific, logo for season play, crate, bots, keys, packs
    if (ID=='0' or AssetPackageName == 'seasonlogos' or
    AssetPackageName == 'itemcontainer' or
    AssetPackageName == 'bots' or
    'key' in AssetPackageName or
    'pack' in AssetPackageName):
        continue
    elif 'body' in FullName:
        body = ('{:4} - {}'.format(ID,AsciiLabel))
        Bodies.append(body)
    elif 'skin' in FullName:
        car=AssetPackageName.split('_')
        if len(car) <= 2:
            car = 'Universal Decal'
        else:
            car = car[1]
        skin = ('{:4} - {} - {}'.format(ID,AsciiLabel,car_dict[car]))
        Decals.append(skin)
    elif 'engineaudio' in FullName:
        engineaudio = ('{:4} - {}'.format(ID,AsciiLabel))
        Engine_Audio.append(engineaudio)
    elif 'flag' in FullName or 'antenna' in FullName or 'pennant' in FullName or '.at' in FullName:
        antenna = ('{:4} - {}'.format(ID,AsciiLabel))
        Antennas.append(antenna)
    elif 'playerbanner' in FullName:
        playerbanner = ('{:4} - {}'.format(ID,AsciiLabel))
        Banners.append(playerbanner)
    elif 'wheel' in FullName:
        wheel = ('{:4} - {}'.format(ID,AsciiLabel))
        Wheels.append(wheel)
    elif 'boost' in FullName:
        boost = ('{:4} - {}'.format(ID,AsciiLabel))
        Boosts.append(boost)
    elif 'explosion' in FullName:
        explosion = ('{:4} - {}'.format(ID,AsciiLabel))
        Goal_Explosions.append(explosion)
    elif 'hat' in FullName or 'crown' in FullName:
        hat = ('{:4} - {}'.format(ID,AsciiLabel))
        Toppers.append(hat)
    elif 'paintfinish' in FullName:
        paintfinish = ('{:4} - {}'.format(ID,AsciiLabel))
        Paints.append(paintfinish)
    elif 'ss' in FullName: #trails
        trail = ('{:4} - {}'.format(ID,AsciiLabel))
        Trails.append(trail)
    else:
        print('unassigned:\n',line_parts)

file_name = input('Clean file (output) name(with "".txt")->')
clean_file = open(file_name, 'w')

clean_file.write("# List of Item ID's in game as of DATE\n\n")
clean_file.write('### ID - AsciiLabel\n\n')
clean_file.write('### Bodies\n```\n')
for body in Bodies:
    clean_file.write(body)
    clean_file.write('\n')

clean_file.write('```\n\n### Wheels\n```\n')
for wheel in Wheels:
    clean_file.write(wheel)
    clean_file.write('\n')

clean_file.write('```\n\n### Boosts\n```\n')
for boost in Boosts:
    clean_file.write(boost)
    clean_file.write('\n')

clean_file.write('```\n\n### Antennas\n```\n')
for antenna in Antennas:
    clean_file.write(antenna)
    clean_file.write('\n')

clean_file.write('```\n\n### Decals\n```\n')
for skin in Decals:
    clean_file.write(skin)
    clean_file.write('\n')

clean_file.write('```\n\n### Toppers\n```\n')
for hat in Toppers:
    clean_file.write(hat)
    clean_file.write('\n')

clean_file.write('```\n\n### Trails\n```\n')
for trail in Trails:
    clean_file.write(trail)
{'fraction_non_alphanumeric': 0.1950830140485313, 'fraction_numerical': 0.009259259259259259, 'mean_word_length': 3.964078182778658, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5270897', 'n_tokens_mistral': 3644, 'n_tokens_neox': 3484, 'n_words': 782}