# Path: l5r/util/log.py
# def log_setup(base_path, base_name):


import l5r.api as api
import l5r.models.advances as advances
import l5r.api.data.skills
from l5r.util import log
from PyQt5 import QtCore, QtGui, QtWidgets
    def currentText(self):
        return self.cb_skills.currentText()

    def currentItem(self):
        return self.itemData(self.currentIndex())

    def itemText(self, index):
        return self.cb_skills.itemText(index)

    def itemData(self, index):
        return self.cb_skills.itemData(index)

    def updateItem(self, item):

        # the stored data could be the skill_id or a tuple (skill_id, skill_rank)
        item_ = self.currentItem()
        skill_id = None
        skill_rank = None
        if isinstance(item_, tuple):
            skill_id, skill_rank = item_
        elif isinstance(item_, list):
            skill_id, skill_rank = item_[0], item_[1]
        else:
            skill_id = item_
        
        if skill_id:
            self.update_book(skill_id)
            self.update_desc(skill_id)
        self.currentIndexChanged.emit(item)


# Path: l5r/util/log.py
# def log_setup(base_path, base_name):


# Path: l5r/dialogs/advdlg.py
import l5r.api as api
import l5r.models.advances as advances
import l5r.api.data.skills
from l5r.util import log
from PyQt5 import QtCore, QtGui, QtWidgets

    def currentText(self):
        return self.cb_skills.currentText()

    def currentItem(self):
        return self.itemData(self.currentIndex())

    def itemText(self, index):
        return self.cb_skills.itemText(index)

    def itemData(self, index):
        return self.cb_skills.itemData(index)

    def updateItem(self, item):

        # the stored data could be the skill_id or a tuple (skill_id, skill_rank)
        item_ = self.currentItem()
        skill_id = None
        skill_rank = None
        if isinstance(item_, tuple):
            skill_id, skill_rank = item_
        elif isinstance(item_, list):
            skill_id, skill_rank = item_[0], item_[1]
        else:
            skill_id = item_
        
        if skill_id:
            self.update_book(skill_id)
            self.update_desc(skill_id)
        self.currentIndexChanged.emit(item)


    def update_desc(self, skill_id):