-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata.py
More file actions
85 lines (73 loc) · 2.35 KB
/
data.py
File metadata and controls
85 lines (73 loc) · 2.35 KB
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
#Data "setup" for Projects
#next step would be to extract project data from a database
def setup():
#Person Data
title = "Charlie-A Music Project"
name = "Charlie, Rohan, Sarah, Rivan, Noah"
source = {
"name": name,
"title": title,
}
#Project Data
project1 = "Hello Series"
projlinks1 = [
Link(
"Project Plan",
"https://docs.google.com/document/d/1fl0xDhyVlljBU_9vBKrwyA1KdtyL13fyFEHq5LzqP-A/edit?usp=sharing"
),
Link("Repl", "https://repl.it/@charliezhu1/Hangman#README.md"),
Link(
"Journals",
"https://docs.google.com/document/d/1fioQivtuh1K1jUl7TWyhOu3eaMYt7DtLRx1GFxRu-Xw/edit?usp=sharing"
)
]
project2 = "Flask Project"
projlinks2 = [
Link(
"Project Plan",
"https://docs.google.com/document/d/1IbB0bGAwiSk8j68Wcs0m1TMWh8LOb2xa7dvgEmebQjc/edit"
),
Link("Repl", "https://repl.it/@charliezhu1/Projectexploring#main.py"),
Link(
"Journals",
"https://docs.google.com/document/d/1fioQivtuh1K1jUl7TWyhOu3eaMYt7DtLRx1GFxRu-Xw/edit?usp=sharing"
)
]
#Project Objects
proj1 = Project(project1, projlinks1)
proj2 = Project(project2, projlinks2)
#HTML Data
projects = Projects(source, [proj1, proj2])
return projects
#Link class contains button (label) and hypertext reference (href)
class Link():
#link data with button and href (url)
def __init__(self, btn, href):
self.btn = btn
self.href = href
def get_btn(self):
return self.btn
def get_href(self):
return self.href
#Project data class contain project name and links (Link class objects)
class Project():
#project data with name and links
def __init__(self, name, links):
self.name = name
self.links = links
def get_name(self):
return self.name
def get_links(self):
return self.links
#Projects class contains person (owner) and multiple projects (Project class objects)
class Projects():
#HTML data with source and projects
def __init__(self, source, projects):
self.source = source
self.projects = projects
#source data getter
def get_source(self):
return self.source
#project data getter
def get_projects(self):
return self.projects