def onBeginWriteConfigItem(writeTracer): """ 写入配置选项 """ Printer.printNewline() name = writeTracer.owner.outItemInfo.name Printer.dout("export", "tipsWriteOut", name=name) if CustomConfig().query("custom/showProgress", bool): global _cappedPrint _cappedPrint = Printer.capPrinter(False)
def onBeginLoadDataSource(loadTracer): """ 开始加载数据源时被调用 """ Printer.dout("theme", "tipsLoadDataSource", src=loadTracer.getSrcText()) if CustomConfig().query("custom/showProgress", bool): global _cappedPrint _cappedPrint = Printer.capPrinter(True) pbarLen = CustomConfig().query("custom/pbarLen", int) _cappedPrint.pbarLen = pbarLen _cappedPrint.pbarChr = CustomConfig().query("custom/pbarChar") _cappedPrint.fmt = Printer.dtext("theme", "tipsLoadDataSourceProgress", pbarLen=pbarLen)
def onBeginScanDataSource(dsrcTracer): """ 开始扫描数据源 """ global _firstScanData if _firstScanData: _firstScanData = False else: Printer.printNewline() srcText = dsrcTracer.dsrc.getSrcText() Printer.dout("export", "tipsScanSrcData", path=srcText) if CustomConfig().query("custom/showProgress", bool): global _cappedPrint _cappedPrint = Printer.capPrinter(False)