celise88 commited on
Commit
3588e6d
·
1 Parent(s): 0795ce5

add styles and values and clean up presentation in UI

Browse files
Files changed (3) hide show
  1. main.py +5 -5
  2. scrape_onet.py +114 -86
  3. templates/job_list.html +191 -16
main.py CHANGED
@@ -128,8 +128,8 @@ def post_job(request: Request, bt: BackgroundTasks, jobtitle: str = Form(enum=[x
128
  knowledge = get_onet_knowledge(onetCode)
129
  abilities = get_onet_abilities(onetCode)
130
  interests = get_onet_interests(onetCode)
131
- #values = get_onet_values(onetCode)
132
- #styles = get_onet_styles(onetCode)
133
 
134
  bt.add_task(neighborhoods, jobtitle)
135
  return templates.TemplateResponse('job_list.html', context={
@@ -143,9 +143,9 @@ def post_job(request: Request, bt: BackgroundTasks, jobtitle: str = Form(enum=[x
143
  'knowledge': knowledge,
144
  'abilities': abilities,
145
  'skills': skills,
146
- 'interests': interests #,
147
- #'values': values,
148
- #'styles': styles
149
  })
150
 
151
  ### JOB NEIGHBORHOODS ###
 
128
  knowledge = get_onet_knowledge(onetCode)
129
  abilities = get_onet_abilities(onetCode)
130
  interests = get_onet_interests(onetCode)
131
+ values = get_onet_values(onetCode)
132
+ styles = get_onet_styles(onetCode)
133
 
134
  bt.add_task(neighborhoods, jobtitle)
135
  return templates.TemplateResponse('job_list.html', context={
 
143
  'knowledge': knowledge,
144
  'abilities': abilities,
145
  'skills': skills,
146
+ 'interests': interests,
147
+ 'values': values,
148
+ 'styles': styles
149
  })
150
 
151
  ### JOB NEIGHBORHOODS ###
scrape_onet.py CHANGED
@@ -29,12 +29,15 @@ def get_onet_tasks(onetCode):
29
  soup = BeautifulSoup(response.text, 'html.parser')
30
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
31
  tasks = clean(tasks)
32
- tasks = tasks.split('show all show top 10')[1]
33
- tasks = tasks.split('occupations related to multiple tasks')[0]
34
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace("core", " - ").replace(" )importance category task", "").replace(" find ", "")
35
- tasks = tasks.split(". ")
36
- tasks = [''.join(map(lambda c: '' if c in '0123456789-' else c, task)) for task in tasks]
37
- return tasks
 
 
 
38
 
39
  def get_onet_activities(onetCode):
40
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -45,19 +48,23 @@ def get_onet_activities(onetCode):
45
  soup = BeautifulSoup(response.text, 'html.parser')
46
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
47
  tasks = clean(tasks)
48
- tasks = tasks.split('show all show top 10')[1]
49
- tasks = tasks.split('back to top')[0]
50
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace("importance work activity", " ")
51
- tasks = tasks.split(". ")
52
- split_data = [item.split(" -- ")[0] for item in tasks]
53
- num_desc = []
54
- for i in range(len(tasks)):
55
- temp = [','.join(item) for item in split_data][i].split(',')
56
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(' ) ', '')])
57
- df = pd.DataFrame(num_desc, columns = ['Importance', 'Work Characteristic'])
58
- df = df[df['Importance'] != '']
59
- activities = df
60
- return activities
 
 
 
 
61
 
62
  def get_onet_context(onetCode):
63
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -68,19 +75,23 @@ def get_onet_context(onetCode):
68
  soup = BeautifulSoup(response.text, 'html.parser')
69
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
70
  tasks = clean(tasks)
71
- tasks = tasks.split('show all show top 10')[1]
72
- tasks = tasks.split('back to top')[0]
73
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace("importance work activity", " ")
74
- tasks = tasks.split("? ")
75
- split_data = [item.split(" -- ")[0] for item in tasks]
76
- num_desc = []
77
- for i in range(len(tasks)):
78
- temp = [','.join(item) for item in split_data][i].split(',')
79
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
80
- df2 = pd.DataFrame(num_desc, columns = ['Importance', 'Work Characteristic'])
81
- df2 = df2[df2['Importance'] != '']
82
- context = df2
83
- return context
 
 
 
 
84
 
85
  def get_onet_skills(onetCode):
86
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -91,19 +102,23 @@ def get_onet_skills(onetCode):
91
  soup = BeautifulSoup(response.text, 'html.parser')
92
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
93
  tasks = clean(tasks)
94
- tasks = tasks.split('show all show top 10')[1]
95
- tasks = tasks.split('back to top')[0]
96
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance skill", " ")
97
- tasks = tasks.split(". ")
98
- split_data = [item.split(" -- ")[0] for item in tasks]
99
- num_desc = []
100
- for i in range(len(tasks)):
101
- temp = [','.join(item) for item in split_data][i].split(',')
102
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
103
- df3 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
104
- df3 = df3[df3['Importance'] != '']
105
- skills = df3
106
- return skills
 
 
 
 
107
 
108
  def get_onet_knowledge(onetCode):
109
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -114,19 +129,23 @@ def get_onet_knowledge(onetCode):
114
  soup = BeautifulSoup(response.text, 'html.parser')
115
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
116
  tasks = clean(tasks)
117
- tasks = tasks.split('show all show top 10')[1]
118
- tasks = tasks.split('back to top')[0]
119
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance knowledge", " ")
120
- tasks = tasks.split(". ")
121
- split_data = [item.split(" -- ")[0] for item in tasks]
122
- num_desc = []
123
- for i in range(len(tasks)):
124
- temp = [','.join(item) for item in split_data][i].split(',')
125
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
126
- df4 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
127
- df4 = df4[df4['Importance'] != '']
128
- knowledge = df4
129
- return knowledge
 
 
 
 
130
 
131
  def get_onet_abilities(onetCode):
132
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -137,19 +156,24 @@ def get_onet_abilities(onetCode):
137
  soup = BeautifulSoup(response.text, 'html.parser')
138
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
139
  tasks = clean(tasks)
140
- tasks = tasks.split('show all show top 10')[1]
141
- tasks = tasks.split('back to top')[0]
142
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance ability", " ")
143
- tasks = tasks.split(". ")
144
- split_data = [item.split(" -- ")[0] for item in tasks]
145
- num_desc = []
146
- for i in range(len(tasks)):
147
- temp = [','.join(item) for item in split_data][i].split(',')
148
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
149
- df5 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
150
- df5 = df5[df5['Importance'] != '']
151
- abilities = df5
152
- return abilities
 
 
 
 
 
153
 
154
  def get_onet_interests(onetCode):
155
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -161,18 +185,22 @@ def get_onet_interests(onetCode):
161
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
162
  tasks = clean(tasks)
163
  tasks = tasks.split("occupational interest interest")[1]#.replace('bright outlook', '').replace('updated 2023', '')
164
- tasks = tasks.split('back to top')[0]
165
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance interest", " ")
166
- tasks = tasks.split(". ")
167
- split_data = [item.split(" -- ")[0] for item in tasks]
168
- num_desc = []
169
- for i in range(len(tasks)):
170
- temp = [','.join(item) for item in split_data][i].split(',')
171
- num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
172
- df6 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
173
- df6 = df6[df6['Importance'] != '']
174
- interests = df6
175
- return interests
 
 
 
 
176
 
177
  def get_onet_values(onetCode):
178
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
@@ -192,7 +220,7 @@ def get_onet_values(onetCode):
192
  for i in range(len(tasks)):
193
  temp = [','.join(item) for item in split_data][i].split(',')
194
  num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
195
- df7 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
196
  df7 = df7[df7['Importance'] != '']
197
  values = df7
198
  return values
@@ -208,14 +236,14 @@ def get_onet_styles(onetCode):
208
  tasks = clean(tasks)
209
  tasks = tasks.split('show all show top 10')[1]
210
  tasks = tasks.split('back to top')[0]
211
- tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance style", " ")
212
  tasks = tasks.split(". ")
213
  split_data = [item.split(" -- ")[0] for item in tasks]
214
  num_desc = []
215
  for i in range(len(tasks)):
216
  temp = [','.join(item) for item in split_data][i].split(',')
217
  num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
218
- df8 = pd.DataFrame(num_desc, columns = ['Importance', 'Candidate Characteristic'])
219
  df8 = df8[df8['Importance'] != '']
220
  styles = df8
221
  return styles
 
29
  soup = BeautifulSoup(response.text, 'html.parser')
30
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
31
  tasks = clean(tasks)
32
+ if len(tasks.split('show all show top 10')) > 1:
33
+ tasks = tasks.split('show all show top 10')[1]
34
+ tasks = tasks.split('occupations related to multiple tasks')[0]
35
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace("core", " - ").replace("supplemental", "").replace("not available", "").replace(" )importance category task", "").replace(" find ", "")
36
+ tasks = tasks.split(". ")
37
+ tasks = [''.join(map(lambda c: '' if c in '0123456789-' else c, task)) for task in tasks]
38
+ return tasks
39
+ else:
40
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
41
 
42
  def get_onet_activities(onetCode):
43
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
48
  soup = BeautifulSoup(response.text, 'html.parser')
49
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
50
  tasks = clean(tasks)
51
+ if len(tasks.split('show all show top 10')) > 1:
52
+ tasks = tasks.split('show all show top 10')[1]
53
+ tasks = tasks.split('back to top')[0]
54
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace("importance work activity", " ")
55
+ tasks = tasks.split(". ")
56
+ split_data = [item.split(" -- ")[0] for item in tasks]
57
+ num_desc = []
58
+ for i in range(len(tasks)):
59
+ temp = [','.join(item) for item in split_data][i].split(',')
60
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(' ) ', '')])
61
+ df = pd.DataFrame(num_desc, columns = ['Importance', 'Activity'])
62
+ df = df[df['Importance'] != '']
63
+ activities = df
64
+ return activities
65
+ else:
66
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
67
+
68
 
69
  def get_onet_context(onetCode):
70
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
75
  soup = BeautifulSoup(response.text, 'html.parser')
76
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
77
  tasks = clean(tasks)
78
+ if len(tasks.split('show all show top 10')) > 1:
79
+ tasks = tasks.split('show all show top 10')[1]
80
+ tasks = tasks.split('back to top')[0]
81
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace("importance work activity", " ")
82
+ tasks = tasks.split("? ")
83
+ split_data = [item.split(" -- ")[0] for item in tasks]
84
+ num_desc = []
85
+ for i in range(len(tasks)):
86
+ temp = [','.join(item) for item in split_data][i].split(',')
87
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
88
+ df2 = pd.DataFrame(num_desc, columns = ['Importance', 'Condition'])
89
+ df2 = df2[df2['Importance'] != '']
90
+ context = df2
91
+ return context
92
+ else:
93
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
94
+
95
 
96
  def get_onet_skills(onetCode):
97
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
102
  soup = BeautifulSoup(response.text, 'html.parser')
103
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
104
  tasks = clean(tasks)
105
+ if len(tasks.split('show all show top 10')) > 1:
106
+ tasks = tasks.split('show all show top 10')[1]
107
+ tasks = tasks.split('back to top')[0]
108
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance skill", " ")
109
+ tasks = tasks.split(". ")
110
+ split_data = [item.split(" -- ")[0] for item in tasks]
111
+ num_desc = []
112
+ for i in range(len(tasks)):
113
+ temp = [','.join(item) for item in split_data][i].split(',')
114
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
115
+ df3 = pd.DataFrame(num_desc, columns = ['Importance', 'Skill'])
116
+ df3 = df3[df3['Importance'] != '']
117
+ skills = df3
118
+ return skills
119
+ else:
120
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
121
+
122
 
123
  def get_onet_knowledge(onetCode):
124
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
129
  soup = BeautifulSoup(response.text, 'html.parser')
130
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
131
  tasks = clean(tasks)
132
+ if len(tasks.split('show all show top 10')) > 1:
133
+ tasks = tasks.split('show all show top 10')[1]
134
+ tasks = tasks.split('back to top')[0]
135
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance knowledge", " ")
136
+ tasks = tasks.split(". ")
137
+ split_data = [item.split(" -- ")[0] for item in tasks]
138
+ num_desc = []
139
+ for i in range(len(tasks)):
140
+ temp = [','.join(item) for item in split_data][i].split(',')
141
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
142
+ df4 = pd.DataFrame(num_desc, columns = ['Importance', 'Knowledge'])
143
+ df4 = df4[df4['Importance'] != '']
144
+ knowledge = df4
145
+ return knowledge
146
+ else:
147
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
148
+
149
 
150
  def get_onet_abilities(onetCode):
151
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
156
  soup = BeautifulSoup(response.text, 'html.parser')
157
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
158
  tasks = clean(tasks)
159
+ if len(tasks.split('show all show top 10')) > 1:
160
+ tasks = tasks.split('show all show top 10')[1]
161
+ tasks = tasks.split('back to top')[0]
162
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance ability", " ")
163
+ tasks = tasks.split(". ")
164
+ split_data = [item.split(" -- ")[0] for item in tasks]
165
+ num_desc = []
166
+ for i in range(len(tasks)):
167
+ temp = [','.join(item) for item in split_data][i].split(',')
168
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
169
+ df5 = pd.DataFrame(num_desc, columns = ['Importance', 'Ability'])
170
+ df5 = df5[df5['Importance'] != '']
171
+ abilities = df5
172
+ return abilities
173
+ else:
174
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
175
+
176
+
177
 
178
  def get_onet_interests(onetCode):
179
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
185
  tasks = str(soup.get_text('reportsubdesc')).replace("reportsubdesc", " ").replace("ImportanceCategoryTask ", "")
186
  tasks = clean(tasks)
187
  tasks = tasks.split("occupational interest interest")[1]#.replace('bright outlook', '').replace('updated 2023', '')
188
+ if len(tasks.split('back to top')) > 1:
189
+ tasks = tasks.split('back to top')[0]
190
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance interest", " ")
191
+ tasks = tasks.split(". ")
192
+ split_data = [item.split(" -- ")[0] for item in tasks]
193
+ num_desc = []
194
+ for i in range(len(tasks)):
195
+ temp = [','.join(item) for item in split_data][i].split(',')
196
+ num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
197
+ df6 = pd.DataFrame(num_desc, columns = ['Importance', 'Interest'])
198
+ df6 = df6[df6['Importance'] != '']
199
+ interests = df6
200
+ return interests
201
+ else:
202
+ return pd.DataFrame([("We're sorry."), ("This occupation is currently undergoing updates."), ("Please try again later.")])
203
+
204
 
205
  def get_onet_values(onetCode):
206
  headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15'}
 
220
  for i in range(len(tasks)):
221
  temp = [','.join(item) for item in split_data][i].split(',')
222
  num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
223
+ df7 = pd.DataFrame(num_desc, columns = ['Importance', 'Value'])
224
  df7 = df7[df7['Importance'] != '']
225
  values = df7
226
  return values
 
236
  tasks = clean(tasks)
237
  tasks = tasks.split('show all show top 10')[1]
238
  tasks = tasks.split('back to top')[0]
239
+ tasks = remove_new_line(tasks).replace("related occupations", " ").replace(")importance work style", "").replace(")importance style", " ")
240
  tasks = tasks.split(". ")
241
  split_data = [item.split(" -- ")[0] for item in tasks]
242
  num_desc = []
243
  for i in range(len(tasks)):
244
  temp = [','.join(item) for item in split_data][i].split(',')
245
  num_desc.append([''.join([c for c in temp if c in '0123456789']), ''.join([c for c in temp if c not in '0123456789']).replace(')context work context', '')])
246
+ df8 = pd.DataFrame(num_desc, columns = ['Importance', 'Style'])
247
  df8 = df8[df8['Importance'] != '']
248
  styles = df8
249
  return styles
templates/job_list.html CHANGED
@@ -38,15 +38,12 @@
38
  </form>
39
  </section>
40
  <section>
41
- <h1 class="sectiontitle">{{ jobtitle }}</h1>
42
  <p class="sectiontext">{{ jobdescription }}</p>
43
  </section>
44
- {% if jobtitle %}
45
- <h1 class="pagesubtitle">About the Job</h1>
46
- {% endif %}
47
  {% if tasks %}
48
  <section>
49
- <h1 class="sectiontitle">Work Tasks:</h1>
50
  <ul class="sectionlist">
51
  {% for task in tasks %}
52
  <li class="sectionlist__item">{{ task }}</li>
@@ -55,15 +52,58 @@
55
  </section>
56
  {% endif %}
57
  {% if jobtitle %}
 
 
 
58
  <section>
59
- <h1 class="sectiontitle">Other Work Activities:</h1>
60
- <p class="sectiontext">{{ activities }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  </section>
62
  {% endif %}
63
  {% if jobtitle %}
64
  <section>
65
  <h1 class="sectiontitle">Work Conditions:</h1>
66
- <p class="sectiontext">{{ conditions }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  </section>
68
  {% endif %}
69
  {% if compensation %}
@@ -83,28 +123,163 @@
83
  {% endif %}
84
  {% if jobtitle %}
85
  <section>
86
- <h1 class="sectiontitle">Knows About:</h1>
87
- <p class="sectiontext">{{ knowledge }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  </section>
89
  {% endif %}
90
  {% if jobtitle %}
91
  <section>
92
- <h1 class="sectiontitle">Is Skilled at:</h1>
93
- <p class="sectiontext">{{ skills }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  </section>
95
  {% endif %}
96
  {% if jobtitle %}
97
  <section>
98
- <h1 class="sectiontitle">Is Able to:</h1>
99
- <p class="sectiontext">{{ abilities }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  </section>
101
  {% endif %}
102
  {% if jobtitle %}
103
  <section>
104
- <h1 class="sectiontitle">Is Interested in:</h1>
105
- <p class="sectiontext">{{ interests }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  </section>
107
  {% endif %}
 
 
 
108
  </main>
109
  <footer class="footer">
110
  <ul class="footer__text">
 
38
  </form>
39
  </section>
40
  <section>
41
+ <h1 class="pagesubtitle">{{ jobtitle }}</h1>
42
  <p class="sectiontext">{{ jobdescription }}</p>
43
  </section>
 
 
 
44
  {% if tasks %}
45
  <section>
46
+ <h1 class="sectiontitle">What {{jobtitle}} do:</h1>
47
  <ul class="sectionlist">
48
  {% for task in tasks %}
49
  <li class="sectionlist__item">{{ task }}</li>
 
52
  </section>
53
  {% endif %}
54
  {% if jobtitle %}
55
+ <h1 class="pagesubtitle">About the Job</h1>
56
+ {% endif %}
57
+ {% if jobtitle %}
58
  <section>
59
+ <h1 class="sectiontitle">Work Activities:</h1>
60
+ <br>
61
+ <table>
62
+ <thead class="output__list">
63
+ <tr>
64
+ <th class="output__list-coloreditem">Activity</th>
65
+ <th class="output__list-coloreditem" scope="col">Importance</th>
66
+ </tr>
67
+ </thead>
68
+ <tbody class="output__list" style="text-align: left">
69
+ {% for n in activities.index %}
70
+ <tr>
71
+ <th class="output__list-item" scope="row">
72
+ {{ activities.loc[n, 'Activity'] }}
73
+ </th>
74
+ <td class="output__list-item" style="text-align: center">
75
+ {{ activities.loc[n, 'Importance'] }}
76
+ </td>
77
+ </tr>
78
+ {% endfor %}
79
+ </tbody>
80
+ </table>
81
  </section>
82
  {% endif %}
83
  {% if jobtitle %}
84
  <section>
85
  <h1 class="sectiontitle">Work Conditions:</h1>
86
+ <br>
87
+ <table>
88
+ <thead class="output__list">
89
+ <tr>
90
+ <th class="output__list-coloreditem">Condition</th>
91
+ <th class="output__list-coloreditem" scope="col">Importance</th>
92
+ </tr>
93
+ </thead>
94
+ <tbody class="output__list" style="text-align: left">
95
+ {% for n in conditions.index %}
96
+ <tr>
97
+ <th class="output__list-item" scope="row">
98
+ {{ conditions.loc[n, 'Condition'] }}
99
+ </th>
100
+ <td class="output__list-item" style="text-align: center">
101
+ {{ conditions.loc[n, 'Importance'] }}
102
+ </td>
103
+ </tr>
104
+ {% endfor %}
105
+ </tbody>
106
+ </table>
107
  </section>
108
  {% endif %}
109
  {% if compensation %}
 
123
  {% endif %}
124
  {% if jobtitle %}
125
  <section>
126
+ <h1 class="sectiontitle">Knowledge:</h1>
127
+ <br>
128
+ <table>
129
+ <thead class="output__list">
130
+ <tr>
131
+ <th class="output__list-coloreditem">Knowledge</th>
132
+ <th class="output__list-coloreditem" scope="col">Importance</th>
133
+ </tr>
134
+ </thead>
135
+ <tbody class="output__list" style="text-align: left">
136
+ {% for n in knowledge.index %}
137
+ <tr>
138
+ <th class="output__list-item" scope="row">
139
+ {{ knowledge.loc[n, 'Knowledge'] }}
140
+ </th>
141
+ <td class="output__list-item" style="text-align: center">
142
+ {{ knowledge.loc[n, 'Importance'] }}
143
+ </td>
144
+ </tr>
145
+ {% endfor %}
146
+ </tbody>
147
+ </table>
148
+ </section>
149
+ {% endif %}
150
+ {% if jobtitle %}
151
+ <section>
152
+ <h1 class="sectiontitle">Skills:</h1>
153
+ <br>
154
+ <table>
155
+ <thead class="output__list">
156
+ <tr>
157
+ <th class="output__list-coloreditem">Skill</th>
158
+ <th class="output__list-coloreditem" scope="col">Importance</th>
159
+ </tr>
160
+ </thead>
161
+ <tbody class="output__list" style="text-align: left">
162
+ {% for n in skills.index %}
163
+ <tr>
164
+ <th class="output__list-item" scope="row">
165
+ {{ skills.loc[n, 'Skill'] }}
166
+ </th>
167
+ <td class="output__list-item" style="text-align: center">
168
+ {{ skills.loc[n, 'Importance'] }}
169
+ </td>
170
+ </tr>
171
+ {% endfor %}
172
+ </tbody>
173
+ </table>
174
+ </section>
175
+ {% endif %}
176
+ {% if jobtitle %}
177
+ <section>
178
+ <h1 class="sectiontitle">Abilities:</h1>
179
+ <br>
180
+ <table>
181
+ <thead class="output__list">
182
+ <tr>
183
+ <th class="output__list-coloreditem">Ability</th>
184
+ <th class="output__list-coloreditem" scope="col">Importance</th>
185
+ </tr>
186
+ </thead>
187
+ <tbody class="output__list" style="text-align: left">
188
+ {% for n in abilities.index %}
189
+ <tr>
190
+ <th class="output__list-item" scope="row">
191
+ {{ abilities.loc[n, 'Ability'] }}
192
+ </th>
193
+ <td class="output__list-item" style="text-align: center">
194
+ {{ abilities.loc[n, 'Importance'] }}
195
+ </td>
196
+ </tr>
197
+ {% endfor %}
198
+ </tbody>
199
+ </table>
200
  </section>
201
  {% endif %}
202
  {% if jobtitle %}
203
  <section>
204
+ <h1 class="sectiontitle">Interests:</h1>
205
+ <br>
206
+ <table>
207
+ <thead class="output__list">
208
+ <tr>
209
+ <th class="output__list-coloreditem">Interest</th>
210
+ <th class="output__list-coloreditem" scope="col">Importance</th>
211
+ </tr>
212
+ </thead>
213
+ <tbody class="output__list" style="text-align: left">
214
+ {% for n in interests.index %}
215
+ <tr>
216
+ <th class="output__list-item" scope="row">
217
+ {{ interests.loc[n, 'Interest'] }}
218
+ </th>
219
+ <td class="output__list-item" style="text-align: center">
220
+ {{ interests.loc[n, 'Importance'] }}
221
+ </td>
222
+ </tr>
223
+ {% endfor %}
224
+ </tbody>
225
+ </table>
226
  </section>
227
  {% endif %}
228
  {% if jobtitle %}
229
  <section>
230
+ <h1 class="sectiontitle">Values:</h1>
231
+ <br>
232
+ <table>
233
+ <thead class="output__list">
234
+ <tr>
235
+ <th class="output__list-coloreditem">Value</th>
236
+ <th class="output__list-coloreditem" scope="col">Importance</th>
237
+ </tr>
238
+ </thead>
239
+ <tbody class="output__list" style="text-align: left">
240
+ {% for n in values.index %}
241
+ <tr>
242
+ <th class="output__list-item" scope="row">
243
+ {{ values.loc[n, 'Value'] }}
244
+ </th>
245
+ <td class="output__list-item" style="text-align: center">
246
+ {{ values.loc[n, 'Importance'] }}
247
+ </td>
248
+ </tr>
249
+ {% endfor %}
250
+ </tbody>
251
+ </table>
252
  </section>
253
  {% endif %}
254
  {% if jobtitle %}
255
  <section>
256
+ <h1 class="sectiontitle">Styles:</h1>
257
+ <br>
258
+ <table>
259
+ <thead class="output__list">
260
+ <tr>
261
+ <th class="output__list-coloreditem">Style</th>
262
+ <th class="output__list-coloreditem" scope="col">Importance</th>
263
+ </tr>
264
+ </thead>
265
+ <tbody class="output__list" style="text-align: left">
266
+ {% for n in styles.index %}
267
+ <tr>
268
+ <th class="output__list-item" scope="row">
269
+ {{ styles.loc[n, 'Style'] }}
270
+ </th>
271
+ <td class="output__list-item" style="text-align: center">
272
+ {{ styles.loc[n, 'Importance'] }}
273
+ </td>
274
+ </tr>
275
+ {% endfor %}
276
+ </tbody>
277
+ </table>
278
  </section>
279
  {% endif %}
280
+ <br>
281
+ <br>
282
+ <br>
283
  </main>
284
  <footer class="footer">
285
  <ul class="footer__text">