Skip to content

Commit e235d27

Browse files
added more web features
1 parent 4a7f0c4 commit e235d27

File tree

4 files changed

+35
-16
lines changed

4 files changed

+35
-16
lines changed

src/.VisualScript.py.swp

20 KB
Binary file not shown.

src/.VisualScript.py.un~

-13.2 KB
Binary file not shown.

src/VisualScript.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def returnMean(list):
159159
sortedlist = sorted(list)
160160
meannum = sum(sortedlist) / len(sortedlist)
161161
return meannum
162-
def webPage(title=, header, content, contentt="", contenttr="", contentb="", contenth="", contentcb="", cssfile=None, filename="index.html"):
162+
def webPageStatic(title=, header, cssfile=None, filename="index.html", content, contentt="", contenttr="", contentb="", contenth="", contentcb=""):
163163
filenamecustom = filename
164164
structure = f"""
165165
<!DOCTOTYPE html>
@@ -183,6 +183,40 @@ def webPage(title=, header, content, contentt="", contenttr="", contentb="", con
183183
with open(filename, "w") as html:
184184
html.write(structure)
185185
webbrowser.open(filename)
186+
def webPage(filename):
187+
structure = f"""
188+
<!DOCTOTYPE html>
189+
<html>
190+
<head>
191+
"""
192+
with open(filename, "a") as html:
193+
html.append(structure)
194+
def webPageTitle(filename, titleCB):
195+
structure = f"""
196+
\n<title>{titleCB}</title>\n
197+
"""
198+
with open(filename, "a") as html:
199+
html.append(structure)
200+
def webPageStyles(filename, cssfile+None):
201+
structure = f"""
202+
\n<link rel="stylesheet" type="text/css/scss" href="{cssfile}">\n
203+
"""
204+
with open(filename, "a") as html:
205+
html.append(structure)
206+
def webPageBody(filename):
207+
structure = f"""
208+
</head>
209+
<body>
210+
"""
211+
with open(filename, "a") as html:
212+
html.append(structure)
213+
def webPageHeader(filename, headerCB):
214+
structure = f"""
215+
\n<h1>{headerCB}</h1>\n
216+
"""
217+
with open(filename, "a") as html:
218+
html.append(structure)
219+
def webPageContent()
186220

187221
def webPageStart(filename):
188222
# opens html files only
@@ -191,7 +225,6 @@ def webPageStart(filename):
191225

192226

193227

194-
195228
custom_features = {
196229

197230
}

src/VisualScript.py~

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,6 @@ def process_code(file):
192192

193193

194194

195-
196-
197-
198-
199-
200-
201-
202-
203-
204-
205-
206-
207-
208-
209195
custom_features = {
210196

211197
}

0 commit comments

Comments
 (0)