-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.py
95 lines (85 loc) · 2.71 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader("templates"))
template = env.get_template("index_template.jhtml")
mobile_template = env.get_template("mobile_template.jhtml")
class Config:
page_author = "Eli Berkowitz"
first_name = "Eli"
last_name = "Berkowitz"
full_name = first_name + " " + last_name
email = "[email protected]"
tags = [
full_name,
last_name,
"Eli Berkowitz",
"Programming",
"Applied Mathematics",
"Computer Science Education",
"Education",
]
sub_pages = [
("about.jhtml", "About"),
("resume.jhtml", "Resumé"),
("projects.jhtml", "Projects"),
("contact.jhtml", "Contact"),
]
projects = [
(
"downup",
"downup.jhtml",
"Downup - Hobby website for small communities to do goal-oriented challenges together"
),
(
"citsci",
"citsci.jhtml",
"Web system for Bard College's Citizen Science program",
),
(
"grading-app",
"grading_app.jhtml",
"Grading app for computer science courses at Brown University [Flask]",
),
("exosim", "exosim.jhtml", "Create and observe your own solar system [p5.js]"),
(
"thrust-test",
"thrust_test_app.jhtml",
(
"Web app developed to provide an API for testing "
"rocket motors and visualizing thrust results [Flask, Raspberry Pi]"
),
),
(
"hveto",
"hveto.jhtml",
(
"Work for LIGO "
"(Laser Interfrometric Gravitational-Wave Observatory) [Python]"
),
),
(
"oakwood",
"oakwood.jhtml",
"Internal-use web apps for Oakwood Friends School [Google Apps Script]",
),
("this_site", "this_site.jhtml", "This website [Python, Jinja, Netlify]"),
(
"melanie-falick",
"melanie_falick.jhtml",
"Redesign of Melanie Falick's website [Squarespace]",
),
(
"life-percent",
"life_percent.jhtml",
(
"Life Percent Website: Shows the "
"user the percent of their life that has passed [Javascript]"
),
),
]
rendered_template = template.render(config=Config, mobile=False)
rendered_mobile = mobile_template.render(config=Config, mobile=True)
with open("site/index.html", "w") as f:
f.write(rendered_template)
with open("site/mobile.html", "w") as f:
f.write(rendered_mobile)
print("recompiled")