# Path: dataimporter/tools.py
# def icat(dct, cat=None, subcat=None, error_absent=False):
#     if cat is not None:
#         res = find_or_create_item(dct, cat, 'subcats', error_absent)
#     if subcat is not None:
#         res = find_or_create_item(
#             res['subcats'], subcat, 'items', error_absent
#         )
#     return res
# 
# def changelog(*args, **kwargs):
#     print(*args, **kwargs, file=sys.stderr)
# 
# Path: dataimporter/fixer.py
# class WowToolsFixer:
#     """Base class for Wowtools-based data fixers."""
#     load_files = False
# 
#     def __init__(self, *args, build=None):
#         self.build = build
#         self._store_init(*args)
#         if self.load_files:
#             self.wt_files = {
#                 int(e['ID']): e for e in self.wt_get_table('files')
#             }
# 
#     def _store_init(self, *args):
#         raise NotImplementedError
# 
#     def run(self):
#         raise NotImplementedError
# 
#     def wt_get_table(self, table_name):
#         return wowtools.get_table(table_name, self.build)
# 
#     def get_icon_name(self, icon_id: int):
#         assert self.load_files
#         icon_name = str(icon_id)
#         if icon_id in self.wt_files:
#             icon_path = self.wt_files[icon_id]['Path']
#             if 'encrypted' not in icon_path:
#                 icon_name = icon_path.split('/')[-1].rsplit('.', 1)[0].lower()
#                 icon_name = icon_name.replace(' ', '-')
# 
#         return icon_name


from .tools import icat, changelog
from .fixer import WowToolsFixer
#!/usr/bin/env python3



IGNORE_MOUNT_ID = [
    7,     # Gray Wolf https://www.wowhead.com/mount/7
    8,     # White Stallion https://www.wowhead.com/mount/8
    12,    # Black Wolf https://www.wowhead.com/mount/12
    13,    # Red Wolf https://www.wowhead.com/mount/13
    15,    # Winter Wolf https://www.wowhead.com/mount/15
    22,    # Black Ram https://www.wowhead.com/mount/22
    28,    # Skeletal Horse https://www.wowhead.com/mount/28
    35,    # Ivory Raptor https://www.wowhead.com/mount/35
    43,    # Green Mechanostrider https://www.wowhead.com/mount/43
    70,    # Riding Kodo https://www.wowhead.com/mount/70
    123,   # Nether Drake https://www.wowhead.com/mount/123
    145,   # Blue Mechanostrider https://www.wowhead.com/mount/145
    206,   # Merciless Nether Drake https://www.wowhead.com/mount/206
    222,   # Swift Zhevra https://www.wowhead.com/mount/222
    225,   # Brewfest Riding Kodo https://www.wowhead.com/mount/225
    238,   # Swift Spectral Gryphon https://www.wowhead.com/mount/238
    251,   # Black Polar Bear https://www.wowhead.com/mount/251
    273,   # Grand Caravan Mammoth https://www.wowhead.com/mount/273
    274,   # Grand Caravan Mammoth https://www.wowhead.com/mount/274
    308,   # Blue Skeletal Warhorse https://www.wowhead.com/mount/308
    333,   # Magic Rooster https://www.wowhead.com/mount/333
    334,   # Magic Rooster https://www.wowhead.com/mount/334
    335,   # Magic Rooster https://www.wowhead.com/mount/335

# Path: dataimporter/tools.py
# def icat(dct, cat=None, subcat=None, error_absent=False):
#     if cat is not None:
#         res = find_or_create_item(dct, cat, 'subcats', error_absent)
#     if subcat is not None:
#         res = find_or_create_item(
#             res['subcats'], subcat, 'items', error_absent
#         )
#     return res
# 
# def changelog(*args, **kwargs):
#     print(*args, **kwargs, file=sys.stderr)
# 
# Path: dataimporter/fixer.py
# class WowToolsFixer:
#     """Base class for Wowtools-based data fixers."""
#     load_files = False
# 
#     def __init__(self, *args, build=None):
#         self.build = build
#         self._store_init(*args)
#         if self.load_files:
#             self.wt_files = {
#                 int(e['ID']): e for e in self.wt_get_table('files')
#             }
# 
#     def _store_init(self, *args):
#         raise NotImplementedError
# 
#     def run(self):
#         raise NotImplementedError
# 
#     def wt_get_table(self, table_name):
#         return wowtools.get_table(table_name, self.build)
# 
#     def get_icon_name(self, icon_id: int):
#         assert self.load_files
#         icon_name = str(icon_id)
#         if icon_id in self.wt_files:
#             icon_path = self.wt_files[icon_id]['Path']
#             if 'encrypted' not in icon_path:
#                 icon_name = icon_path.split('/')[-1].rsplit('.', 1)[0].lower()
#                 icon_name = icon_name.replace(' ', '-')
# 
#         return icon_name


# Path: dataimporter/mounts.py
from .tools import icat, changelog
from .fixer import WowToolsFixer

#!/usr/bin/env python3



IGNORE_MOUNT_ID = [
    7,     # Gray Wolf https://www.wowhead.com/mount/7
    8,     # White Stallion https://www.wowhead.com/mount/8
    12,    # Black Wolf https://www.wowhead.com/mount/12
    13,    # Red Wolf https://www.wowhead.com/mount/13
    15,    # Winter Wolf https://www.wowhead.com/mount/15
    22,    # Black Ram https://www.wowhead.com/mount/22
    28,    # Skeletal Horse https://www.wowhead.com/mount/28
    35,    # Ivory Raptor https://www.wowhead.com/mount/35
    43,    # Green Mechanostrider https://www.wowhead.com/mount/43
    70,    # Riding Kodo https://www.wowhead.com/mount/70
    123,   # Nether Drake https://www.wowhead.com/mount/123
    145,   # Blue Mechanostrider https://www.wowhead.com/mount/145
    206,   # Merciless Nether Drake https://www.wowhead.com/mount/206
    222,   # Swift Zhevra https://www.wowhead.com/mount/222
    225,   # Brewfest Riding Kodo https://www.wowhead.com/mount/225
    238,   # Swift Spectral Gryphon https://www.wowhead.com/mount/238
    251,   # Black Polar Bear https://www.wowhead.com/mount/251
    273,   # Grand Caravan Mammoth https://www.wowhead.com/mount/273
    274,   # Grand Caravan Mammoth https://www.wowhead.com/mount/274
    308,   # Blue Skeletal Warhorse https://www.wowhead.com/mount/308
    333,   # Magic Rooster https://www.wowhead.com/mount/333
    334,   # Magic Rooster https://www.wowhead.com/mount/334
    335,   # Magic Rooster https://www.wowhead.com/mount/335

    462,   # White Riding Yak https://www.wowhead.com/mount/462