MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _insertHTML

Function _insertHTML

SLiCAP/SLiCAPhtml.py:122–139  ·  view source on GitHub ↗

Inserts html in the file specified by 'fileName' at the location of the string 'htmlInsert'. :param fileName: name of the file :type fileName: str :param htmlInsert: HTML that must be inserted in this file :type htmlInsert: str

(fileName, htmlInsert)

Source from the content-addressed store, hash-verified

120 return html
121
122def _insertHTML(fileName, htmlInsert):
123 """
124 Inserts html in the file specified by 'fileName' at the location of the
125 string 'htmlInsert'.
126
127 :param fileName: name of the file
128 :type fileName: str
129
130 :param htmlInsert: HTML that must be inserted in this file
131 :type htmlInsert: str
132 """
133 if ini.notebook:
134 htmlInsert = HTML(htmlInsert)
135 else:
136 html = _readFile(fileName)
137 html = html.replace(_HTMLINSERT, htmlInsert + _HTMLINSERT)
138 _writeFile(fileName, html)
139 return htmlInsert
140
141def _readFile(fileName):
142 """

Callers 15

specs2htmlFunction · 0.90
htmlPageFunction · 0.85
head2htmlFunction · 0.85
head3htmlFunction · 0.85
text2htmlFunction · 0.85
netlist2htmlFunction · 0.85
lib2htmlFunction · 0.85
elementData2htmlFunction · 0.85
params2htmlFunction · 0.85
img2htmlFunction · 0.85
csv2htmlFunction · 0.85
expr2htmlFunction · 0.85

Calls 2

_readFileFunction · 0.85
_writeFileFunction · 0.85

Tested by

no test coverage detected