chapisha/helpers/pages.py
def create_dedication_xhtml(dedication: [str, list[str]]) -> str:
    """
    Load the default `dedication.xhtml` file, and generate the required terms for the creative work. Return xhtml as a string.
    
    Parameters
    ----------
    dedication: str or list of str
            Provide as a string, or list of strings for multiple paragraphs.

    Returns
    -------
    str: xhtml response for `dedication.xhtml` as a str.
    """
    if isinstance(dedication, list):
        dedication = "\n".join(dedication)
    with open(DATA_PATH / "xhtml" / DEFAULT_DEDICATION_XHTML, "r+", encoding="utf-8") as xml_file:
        xml_txt = xml_file.read()
        ddctn_xml = ""
        for p in formats.get_text_paragraphs(dedication):
            ddctn_xml += F"\t\t\t<p>{p}</p>\n"
        xml_txt = xml_txt.replace("\t\t\tDEDICATION\n", ddctn_xml)
    return xml_txt

    Load the default `dedication.xhtml` file, and generate the required terms for the creative work. Return xhtml as a string.
    
    Parameters
    ----------
    dedication: str or list of str
            Provide as a string, or list of strings for multiple paragraphs.

    Returns
    -------
    str: xhtml response for `dedication.xhtml` as a str.
    
Load the default `dedication.xhtml` file, and generate the required terms for the creative work. Return xhtml as a string.
Parameters

str or list of str
Provide as a string, or list of strings for multiple paragraphs.

Returns

xhtml response for `dedication.xhtml` as a str.
Load the default ` dedication . xhtml ` file and generate the required terms for the creative work . Return xhtml as a string . Parameters str or list of str Provide as a string or list of strings for multiple paragraphs . Returns xhtml response for ` dedication . xhtml ` as a str .
def create_dedication_xhtml(dedication: [str, list[str]]) -> str:
    if isinstance(dedication, list):
        dedication = "\n".join(dedication)
    with open(DATA_PATH / "xhtml" / DEFAULT_DEDICATION_XHTML, "r+", encoding="utf-8") as xml_file:
        xml_txt = xml_file.read()
        ddctn_xml = ""
        for p in formats.get_text_paragraphs(dedication):
            ddctn_xml += F"\t\t\t<p>{p}</p>\n"
        xml_txt = xml_txt.replace("\t\t\tDEDICATION\n", ddctn_xml)
    return xml_txt
def create_dedication_xhtml ( dedication : [ str , list [ str ] ] ) -> str : if isinstance ( dedication , list ) : dedication = "\n" . join ( dedication ) with open ( DATA_PATH / "xhtml" / DEFAULT_DEDICATION_XHTML , "r+" , encoding = "utf-8" ) as xml_file : xml_txt = xml_file . read ( ) ddctn_xml = "" for p in formats . get_text_paragraphs ( dedication ) : ddctn_xml += F"\t\t\t<p>{p}</p>\n" xml_txt = xml_txt . replace ( "\t\t\tDEDICATION\n" , ddctn_xml ) return xml_txt
Load the default `dedication.xhtml` file, and generate the required terms for the creative work.
Load the default ` dedication . xhtml ` file and generate the required terms for the creative work .
"""
    Load the default `dedication.xhtml` file, and generate the required terms for the creative work. Return xhtml as a string.
    
    Parameters
    ----------
    dedication: str or list of str
            Provide as a string, or list of strings for multiple paragraphs.

    Returns
    -------
    str: xhtml response for `dedication.xhtml` as a str.
    """
dedication
[str, list[str]]