cmd_utf#

folders test

cmd_utf API documentation

Module cmd_utf

Functions

def append(self)

summary

def cmd_parse(cmdL, apiS, insertB)

summary

def declare(self)

import values from files

def github(self)

summary

def image(self)

insert image(s) from files

def list(self)

import data from files

:return lineS: md table :rtype: str

def project(self)

insert project information from txt

:return lineS: utf text :rtype: str

def table(self)

insert table from csv or xlsx file

:return lineS: md table :rtype: str

def text(self)

insert text from file

|| text | folder | file | type

:param lineS: string block

def txthtml(self, txtfileL)

9a summary

:return: description :rtype: type

def txttex(self, txtfileS, txttypeS)

9b summary

:return: description :rtype: type

def vtable(self, tbL, hdrL, tblfmt, alignL)

write value table

Classes

class CmdUTF (paramL, labelD, folderD, localD)

summary

:param paramL: description :type paramL: type :param labelD: description :type labelD: type :param folderD: description :type folderD: type :param localD: description :type localD: type :return: description :rtype: type

Expand source code
class CmdUTF():

    def __init__(self, paramL, labelD, folderD,  localD):
        """_summary_

        :param paramL: _description_
        :type paramL: _type_
        :param labelD: _description_
        :type labelD: _type_
        :param folderD: _description_
        :type folderD: _type_
        :param localD: _description_
        :type localD: _type_
        :return: _description_
        :rtype: _type_
        """

        self.localD = localD
        self.folderD = folderD
        self.labelD = labelD
        self.widthII = labelD["widthI"] - 1
        self.paramL = paramL
        self.errlogP = folderD["errlogP"]

        modnameS = self.labelD["modnameS"]
        # print(f"{modnameS=}")
        logging.basicConfig(
            level=logging.DEBUG,
            format="%(asctime)-8s  " + modnameS +
            "   %(levelname)-8s %(message)s",
            datefmt="%m-%d %H:%M",
            filename=self.errlogP,
            filemode="w",
        )
        warnings.filterwarnings("ignore")

        fileS = paramL[0].strip()
        if fileS[0:4] == "data":
            self.currP = folderD["docpathP"]
            self.relP = fileS
        elif fnmatch.fnmatch(fileS[0:5], "r[0-9]"):
            self.currP = Path(folderD["pubP"])
        else:
            self.currP = Path(folderD["prvP"])