Skip to content

Commit 2c7a7c0

Browse files
update and add audio features
1 parent e235d27 commit 2c7a7c0

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
lines changed

src/.VisualScript.py.swp

0 Bytes
Binary file not shown.

src/.VisualScript.py.un~

28.1 KB
Binary file not shown.

src/VisualScript.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,34 @@ def webPageHeader(filename, headerCB):
216216
"""
217217
with open(filename, "a") as html:
218218
html.append(structure)
219-
def webPageContent()
219+
def webPageContent(filename, contentCB):
220+
structure = f"""
221+
\n<p>{filename}</p>\n
222+
"""
223+
with open(filename, "a") as html:
224+
html.append(structure)
225+
def webPageContacts(filename, infoCB):
226+
structure = f"""
227+
\n<address>{infoCB}</address>\n
228+
"""
229+
with open(filename, "a") as html:
230+
html.append(structure)
231+
def webPageLinks(filename, link, textCB):
232+
structure = """
233+
\n <a href={link}>{textCB}</a>\n
234+
"""
235+
with open(filename, "a") as html:
236+
html.append(structure)
237+
def webPageSound(filename, soundfileCB):
238+
structure = """
239+
<audio>
240+
<source src={soundfileCB} type="audio/mpeg">
241+
</audio>
242+
"""
243+
with open(filename, "a") as html:
244+
html.append(structure)
245+
246+
220247

221248
def webPageStart(filename):
222249
# opens html files only

src/VisualScript.py~

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def process_code(file):
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 process_code(file):
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 process_code(file):
191225

192226

193227

194-
195228
custom_features = {
196229

197230
}

0 commit comments

Comments
 (0)