コード例 #1
0
def _printTplMsg(tplFileName):
    """
	打印模板信息
	"""
    Printer.printNewline()
    Printer.printBlockHead(
        None, [Printer.dtext("theme", "tipsTplFile", file=tplFileName)])
コード例 #2
0
def _printAppMsg():
    """
	打印程序信息
	"""
    Printer.printBlockHead(
        Printer.dtext("theme", "tipsProgramInfo"),
        [
            "program: TableExporter.exe",
            "version: %s" % engine.VERSION,
            "author : huangyongwei",
            "date   : 2011/09/20",
        ],
    )
コード例 #3
0
def onBeginExportConfigItem(exportItemTracer):
    """
	开始导出一个配置选项时调用
	"""
    global _firstScanData
    _firstScanData = True
    exportTracer = exportItemTracer.owner
    if len(exportTracer.exportItemTracers) > 1:
        outItemInfo = exportItemTracer.outItemInfo
        Printer.printBlockHead(
            None, [
                Printer.dtext(
                    "theme", "tipsBeginExportItem", dname=outItemInfo.name)
            ],
            width=CustomConfig().query("custom/blockWidth", int) - 10,
            blockChr="-")
コード例 #4
0
def onBeginExportConfig(exportTracer):
    """
	开始导出一个模板中的其中一个配置
	"""
    # 数据源信息
    outInfo = exportTracer.outInfo
    srcMsgs = [Printer.dtext("export", "tipsSrcData")]
    for outItemInfo in outInfo.outItemInfos:
        for text in outItemInfo.dsrcTextList:
            text = "  " + text
            if text not in srcMsgs:
                srcMsgs.append(text)
    # 导出配置信息
    dstMsgs = [Printer.dtext("export", "tipsDstFile", file=outInfo.dstFile)]

    Printer.printNewline()
    Printer.printBlockHead(Printer.dtext("export", "tipsExporedInfo"),
                           srcMsgs + dstMsgs)