def create_index(self, asset_files=False):
        logging.info("Creating new assets index...")
        if not asset_files:
            asset_files = self.find_assets()

        blueprints = Blueprints(self)
        items = Items(self)
        species = Species(self)
        monsters = Monsters(self)
        techs = Techs(self)
        frames = Frames(self)

        new_index_query = "insert into assets values (?, ?, ?, ?, ?, ?)"
        c = self.db.cursor()

        for asset in asset_files:
            yield (asset[0], asset[1])

            tmp_data = None

            if asset_category(asset[0]) != '':
                if asset[0].endswith(".png"):
                    tmp_data = (asset[0], asset[1], "image", "", "", "")
                elif blueprints.is_blueprint(asset[0]):
                    tmp_data = blueprints.index_data(asset)
                elif species.is_species(asset[0]):
                    tmp_data = species.index_data(asset)
                elif items.is_item(asset[0]):
                    tmp_data = items.index_data(asset)
                elif monsters.is_monster(asset[0]):
                    tmp_data = monsters.index_data(asset)
                elif techs.is_tech(asset[0]):
                    tmp_data = techs.index_data(asset)
                elif frames.is_frames(asset[0]):
                    tmp_data = frames.index_data(asset)
            else:
                logging.warning("Skipping invalid asset (no file extension) %s in %s" % (asset[0], asset[1]))

            if tmp_data is not None:
                c.execute(new_index_query, tmp_data)

        self.db.commit()
        logging.info("Finished creating index")
dataset/ETHPy150Open wizzomafizzo/starcheat/starcheat/assets/core.py/Assets.create_index/original