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


import l5r.api as api
import l5r.api.data.powers
import l5r.api.character.powers
from l5r.util import log
from PyQt5 import QtCore, QtGui, QtWidgets
        is_eligible = (api.character.has_tag('dragon_togashi_tattooed_order') or
                       api.character.has_tag('dragon_ob_hoshi_tsurui_zumi') or
                       api.character.has_tag('dragon_ob_hitomi_kikage_zumi'))
        if not is_eligible:
            self.tx_pc_status.setText(
                u"""<span style="color:#A00">{0}</span>""".format(status_ko))
        else:
            self.tx_pc_status.setText(
                u"""<span style="color:#0A0">{0}</span>""".format(status_ok))

        self.tx_detail.setText(u"<p><em>{0}</em></p>".format(kiho.desc))
        self.bt_ok.setEnabled(is_eligible)

    def accept(self):
        # save item
        self.parent().do_buy_kiho(self.item)
        super(TattooDialog, self).accept()

    def update_book(self, tattoo_data):
        try:
            source_book = tattoo_data.pack
            page_number = tattoo_data.page

            if not source_book:
                self.lb_book.setText("")
            elif not page_number:                
                self.lb_book.setText(em(source_book.display_name))
            else:
                self.lb_book.setText(em(self.tr(f"{source_book.display_name}, page {page_number}")))
        except:

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


# Path: l5r/dialogs/kihodlg.py
import l5r.api as api
import l5r.api.data.powers
import l5r.api.character.powers
from l5r.util import log
from PyQt5 import QtCore, QtGui, QtWidgets

        is_eligible = (api.character.has_tag('dragon_togashi_tattooed_order') or
                       api.character.has_tag('dragon_ob_hoshi_tsurui_zumi') or
                       api.character.has_tag('dragon_ob_hitomi_kikage_zumi'))
        if not is_eligible:
            self.tx_pc_status.setText(
                u"""<span style="color:#A00">{0}</span>""".format(status_ko))
        else:
            self.tx_pc_status.setText(
                u"""<span style="color:#0A0">{0}</span>""".format(status_ok))

        self.tx_detail.setText(u"<p><em>{0}</em></p>".format(kiho.desc))
        self.bt_ok.setEnabled(is_eligible)

    def accept(self):
        # save item
        self.parent().do_buy_kiho(self.item)
        super(TattooDialog, self).accept()

    def update_book(self, tattoo_data):
        try:
            source_book = tattoo_data.pack
            page_number = tattoo_data.page

            if not source_book:
                self.lb_book.setText("")
            elif not page_number:                
                self.lb_book.setText(em(source_book.display_name))
            else:
                self.lb_book.setText(em(self.tr(f"{source_book.display_name}, page {page_number}")))
        except:

            log.ui.error(f'cannot load source book for tattoo: {tattoo_data.id}', exc_info=1)