-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEPS-sustainability.py
55 lines (51 loc) · 1.52 KB
/
EPS-sustainability.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import abstra.forms as af
# Open the glossary file. It contains the definitions of the terms used in the survey
with open("./EPS/sustainability/WHY.html", "r") as file:
html_content = file.read()
# Render WHY page
why_page = (
af.Page()
.display_html(
f"""
<style>
h1, h2 {"{text-align: center;}"}
p {"{text-align: justify;}"}
</style>
{html_content}"""
)
.display_html(
"""
<style>
h2 {"{text-align: center;}"}
</style>
<h2>Select the desired impact level for the application being assessed.</h2>
""")
.read_cards(
label=f"",
options=[{"title": "LOW", "image": "./img/low.png",
"description": "Low Impact: the application does not require great levels of algorithmic sustainability."},
{"title": "INTERMEDIATE", "image": "./img/medium.png",
"description": "Intermediate Impact: the application requires some level of algorithmic sustainability."},
{"title": "HIGH", "image": "./img/high.png",
"description": "High Impact: the application requires a high level of algorithmic sustainability."}],
multiple=False,
required=True,
)
.run("Lern how to deal with algorithmic sustainability")
)
# Open the source for the SHOULD-HOW page
with open(f"""./EPS/sustainability/SHOULD-HOW-{why_page['']['title']}.html""", "r") as file:
html_content = file.read()
# Render SHOULD-HOW page
should_how_page = (
af.Page()
.display_html(
f"""
<style>
h1, h2, {"{text-align: center;}"}
p {"{text-align: justify;}"}
</style>
{html_content}"""
)
.run("Finish")
)