Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit a15ace6

Browse files
committed
wip: augment courses with tags
1 parent a9e6b70 commit a15ace6

File tree

7 files changed

+387
-3
lines changed

7 files changed

+387
-3
lines changed

events/saved-bookmarks.json

Lines changed: 364 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,364 @@
1+
{
2+
"Records": [
3+
{
4+
"eventID": "3ff3074de6e6f0e6694307e8e935fdb8",
5+
"eventName": "INSERT",
6+
"eventVersion": "1.1",
7+
"eventSource": "aws:dynamodb",
8+
"awsRegion": "us-east-1",
9+
"dynamodb": {
10+
"ApproximateCreationDateTime": 1481280060,
11+
"Keys": {
12+
"resource-url": {
13+
"S": "http://rogerdudler.github.io/git-guide/"
14+
},
15+
"offcourse-id": {
16+
"S": "offcourse::r2j2::-4966020065::1::4"
17+
}
18+
},
19+
"NewImage": {
20+
"curator": {
21+
"S": "r2j2"
22+
},
23+
"resource-url": {
24+
"S": "http://rogerdudler.github.io/git-guide/"
25+
},
26+
"offcourse-id": {
27+
"S": "offcourse::r2j2::-4966020065::1::4"
28+
},
29+
"timestamp": {
30+
"N": "1481280057747"
31+
}
32+
},
33+
"SequenceNumber": "177895100000000003385485335",
34+
"SizeBytes": 222,
35+
"StreamViewType": "NEW_IMAGE"
36+
},
37+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
38+
},
39+
{
40+
"eventID": "aff80d6adcb71f5fc750285416509765",
41+
"eventName": "INSERT",
42+
"eventVersion": "1.1",
43+
"eventSource": "aws:dynamodb",
44+
"awsRegion": "us-east-1",
45+
"dynamodb": {
46+
"ApproximateCreationDateTime": 1481280060,
47+
"Keys": {
48+
"resource-url": {
49+
"S": "https://www.codecademy.com/en/courses/learn-git"
50+
},
51+
"offcourse-id": {
52+
"S": "offcourse::r2j2::-4966020065::1::3"
53+
}
54+
},
55+
"NewImage": {
56+
"curator": {
57+
"S": "r2j2"
58+
},
59+
"resource-url": {
60+
"S": "https://www.codecademy.com/en/courses/learn-git"
61+
},
62+
"offcourse-id": {
63+
"S": "offcourse::r2j2::-4966020065::1::3"
64+
},
65+
"timestamp": {
66+
"N": "1481280057746"
67+
}
68+
},
69+
"SequenceNumber": "177895200000000003385485351",
70+
"SizeBytes": 238,
71+
"StreamViewType": "NEW_IMAGE"
72+
},
73+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
74+
},
75+
{
76+
"eventID": "d361463dbbb195994842b0d581aa2f61",
77+
"eventName": "INSERT",
78+
"eventVersion": "1.1",
79+
"eventSource": "aws:dynamodb",
80+
"awsRegion": "us-east-1",
81+
"dynamodb": {
82+
"ApproximateCreationDateTime": 1481280060,
83+
"Keys": {
84+
"resource-url": {
85+
"S": "https://backlogtool.com/git-guide/en/intro/intro1_1.html"
86+
},
87+
"offcourse-id": {
88+
"S": "offcourse::r2j2::-4966020065::1::1"
89+
}
90+
},
91+
"NewImage": {
92+
"curator": {
93+
"S": "r2j2"
94+
},
95+
"resource-url": {
96+
"S": "https://backlogtool.com/git-guide/en/intro/intro1_1.html"
97+
},
98+
"offcourse-id": {
99+
"S": "offcourse::r2j2::-4966020065::1::1"
100+
},
101+
"timestamp": {
102+
"N": "1481280057744"
103+
}
104+
},
105+
"SequenceNumber": "177895300000000003385485352",
106+
"SizeBytes": 256,
107+
"StreamViewType": "NEW_IMAGE"
108+
},
109+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
110+
},
111+
{
112+
"eventID": "278fad5c9c18999c17e0cfa2934af28f",
113+
"eventName": "INSERT",
114+
"eventVersion": "1.1",
115+
"eventSource": "aws:dynamodb",
116+
"awsRegion": "us-east-1",
117+
"dynamodb": {
118+
"ApproximateCreationDateTime": 1481280060,
119+
"Keys": {
120+
"resource-url": {
121+
"S": "https://www.atlassian.com/git/tutorials/what-is-version-control"
122+
},
123+
"offcourse-id": {
124+
"S": "offcourse::r2j2::-4966020065::1::0"
125+
}
126+
},
127+
"NewImage": {
128+
"curator": {
129+
"S": "r2j2"
130+
},
131+
"resource-url": {
132+
"S": "https://www.atlassian.com/git/tutorials/what-is-version-control"
133+
},
134+
"offcourse-id": {
135+
"S": "offcourse::r2j2::-4966020065::1::0"
136+
},
137+
"timestamp": {
138+
"N": "1481280057744"
139+
}
140+
},
141+
"SequenceNumber": "177895400000000003385485353",
142+
"SizeBytes": 270,
143+
"StreamViewType": "NEW_IMAGE"
144+
},
145+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
146+
},
147+
{
148+
"eventID": "5fa82fd48ee8c02231f9f197e7c9b072",
149+
"eventName": "INSERT",
150+
"eventVersion": "1.1",
151+
"eventSource": "aws:dynamodb",
152+
"awsRegion": "us-east-1",
153+
"dynamodb": {
154+
"ApproximateCreationDateTime": 1481280060,
155+
"Keys": {
156+
"resource-url": {
157+
"S": "https://www.codefellows.org/blog/git-and-github-what-s-the-difference/"
158+
},
159+
"offcourse-id": {
160+
"S": "offcourse::r2j2::-4966020065::1::2"
161+
}
162+
},
163+
"NewImage": {
164+
"curator": {
165+
"S": "r2j2"
166+
},
167+
"resource-url": {
168+
"S": "https://www.codefellows.org/blog/git-and-github-what-s-the-difference/"
169+
},
170+
"offcourse-id": {
171+
"S": "offcourse::r2j2::-4966020065::1::2"
172+
},
173+
"timestamp": {
174+
"N": "1481280057745"
175+
}
176+
},
177+
"SequenceNumber": "177895500000000003385485355",
178+
"SizeBytes": 284,
179+
"StreamViewType": "NEW_IMAGE"
180+
},
181+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
182+
},
183+
{
184+
"eventID": "bf36644b91e31a86ec6236dfc9e465e3",
185+
"eventName": "MODIFY",
186+
"eventVersion": "1.1",
187+
"eventSource": "aws:dynamodb",
188+
"awsRegion": "us-east-1",
189+
"dynamodb": {
190+
"ApproximateCreationDateTime": 1481280060,
191+
"Keys": {
192+
"resource-url": {
193+
"S": "http://computationaltales.blogspot.be/2011/08/fun-with-boolean-statements.html"
194+
},
195+
"offcourse-id": {
196+
"S": "offcourse::r2j2::-1108454255::2::2"
197+
}
198+
},
199+
"NewImage": {
200+
"curator": {
201+
"S": "r2j2"
202+
},
203+
"resource-url": {
204+
"S": "http://computationaltales.blogspot.be/2011/08/fun-with-boolean-statements.html"
205+
},
206+
"offcourse-id": {
207+
"S": "offcourse::r2j2::-1108454255::2::2"
208+
},
209+
"timestamp": {
210+
"N": "1481280102029"
211+
}
212+
},
213+
"SequenceNumber": "177895600000000003385513478",
214+
"SizeBytes": 300,
215+
"StreamViewType": "NEW_IMAGE"
216+
},
217+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
218+
},
219+
{
220+
"eventID": "d53520845d6d03e28a1a179400f2f679",
221+
"eventName": "MODIFY",
222+
"eventVersion": "1.1",
223+
"eventSource": "aws:dynamodb",
224+
"awsRegion": "us-east-1",
225+
"dynamodb": {
226+
"ApproximateCreationDateTime": 1481280060,
227+
"Keys": {
228+
"resource-url": {
229+
"S": "http://javascript-roadtrip.codeschool.com/levels/1/challenges/1"
230+
},
231+
"offcourse-id": {
232+
"S": "offcourse::r2j2::-1108454255::2::1"
233+
}
234+
},
235+
"NewImage": {
236+
"curator": {
237+
"S": "r2j2"
238+
},
239+
"resource-url": {
240+
"S": "http://javascript-roadtrip.codeschool.com/levels/1/challenges/1"
241+
},
242+
"offcourse-id": {
243+
"S": "offcourse::r2j2::-1108454255::2::1"
244+
},
245+
"timestamp": {
246+
"N": "1481280102029"
247+
}
248+
},
249+
"SequenceNumber": "177895700000000003385513479",
250+
"SizeBytes": 270,
251+
"StreamViewType": "NEW_IMAGE"
252+
},
253+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
254+
},
255+
{
256+
"eventID": "005e36af6bcfaebba5fac4eb0cad452f",
257+
"eventName": "MODIFY",
258+
"eventVersion": "1.1",
259+
"eventSource": "aws:dynamodb",
260+
"awsRegion": "us-east-1",
261+
"dynamodb": {
262+
"ApproximateCreationDateTime": 1481280060,
263+
"Keys": {
264+
"resource-url": {
265+
"S": "http://www.masswerk.at/"
266+
},
267+
"offcourse-id": {
268+
"S": "offcourse::r2j2::-1108454255::2::3"
269+
}
270+
},
271+
"NewImage": {
272+
"curator": {
273+
"S": "r2j2"
274+
},
275+
"resource-url": {
276+
"S": "http://www.masswerk.at/"
277+
},
278+
"offcourse-id": {
279+
"S": "offcourse::r2j2::-1108454255::2::3"
280+
},
281+
"timestamp": {
282+
"N": "1481280102029"
283+
}
284+
},
285+
"SequenceNumber": "177895800000000003385513480",
286+
"SizeBytes": 190,
287+
"StreamViewType": "NEW_IMAGE"
288+
},
289+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
290+
},
291+
{
292+
"eventID": "e03fc26c1ca58a4cb262eec0d8e097bc",
293+
"eventName": "MODIFY",
294+
"eventVersion": "1.1",
295+
"eventSource": "aws:dynamodb",
296+
"awsRegion": "us-east-1",
297+
"dynamodb": {
298+
"ApproximateCreationDateTime": 1481280060,
299+
"Keys": {
300+
"resource-url": {
301+
"S": "https://jenniferdewalt.com/party_time.html"
302+
},
303+
"offcourse-id": {
304+
"S": "offcourse::r2j2::-1108454255::2::4"
305+
}
306+
},
307+
"NewImage": {
308+
"curator": {
309+
"S": "r2j2"
310+
},
311+
"resource-url": {
312+
"S": "https://jenniferdewalt.com/party_time.html"
313+
},
314+
"offcourse-id": {
315+
"S": "offcourse::r2j2::-1108454255::2::4"
316+
},
317+
"timestamp": {
318+
"N": "1481280102030"
319+
}
320+
},
321+
"SequenceNumber": "177895900000000003385513481",
322+
"SizeBytes": 228,
323+
"StreamViewType": "NEW_IMAGE"
324+
},
325+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
326+
},
327+
{
328+
"eventID": "d35f078848929d08616a80b0f661c241",
329+
"eventName": "MODIFY",
330+
"eventVersion": "1.1",
331+
"eventSource": "aws:dynamodb",
332+
"awsRegion": "us-east-1",
333+
"dynamodb": {
334+
"ApproximateCreationDateTime": 1481280060,
335+
"Keys": {
336+
"resource-url": {
337+
"S": "http://eloquentjavascript.net/01_values.html"
338+
},
339+
"offcourse-id": {
340+
"S": "offcourse::r2j2::-1108454255::2::0"
341+
}
342+
},
343+
"NewImage": {
344+
"curator": {
345+
"S": "r2j2"
346+
},
347+
"resource-url": {
348+
"S": "http://eloquentjavascript.net/01_values.html"
349+
},
350+
"offcourse-id": {
351+
"S": "offcourse::r2j2::-1108454255::2::0"
352+
},
353+
"timestamp": {
354+
"N": "1481280102029"
355+
}
356+
},
357+
"SequenceNumber": "177896000000000003385513482",
358+
"SizeBytes": 232,
359+
"StreamViewType": "NEW_IMAGE"
360+
},
361+
"eventSourceARN": "arn:aws:dynamodb:us-east-1:774182433398:table/bookmarks-dev/stream/2016-11-01T23:45:45.927"
362+
}
363+
]
364+
}

functions/build.boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[org.clojure/test.check "0.9.0"]
1313
[org.clojure/clojurescript "1.9.229"]
1414
[com.cemerick/piggieback "0.2.2-SNAPSHOT" :scope "test"]
15-
[offcourse/shared "0.5.6"]
15+
[offcourse/shared "0.5.7"]
1616
[offcourse/backend-shared "0.2.0-SNAPSHOT"]
1717
[weasel "0.7.0" :scope "test"]
1818
[org.clojure/tools.nrepl "0.2.12" :scope "test"]])

functions/src/app/augment/implementation.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
(defn augment-checkpoint [{:keys [resource-url] :as checkpoint} tags url]
77
(if (= resource-url url)
8-
(assoc checkpoint :tags tags)
8+
(assoc checkpoint :tags (take 3 tags))
99
checkpoint))
1010

1111
(defn augment-checkpoints [course tags-data]

functions/src/app/augment/index.cljs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
(:require-macros [cljs.core.async.macros :refer [go]]))
1010

1111
(def adapters {:db {:table-names {:bookmarks (.. js/process -env -bookmarksTable)
12+
:resources (.. js/process -env -resourcesTable)
1213
:courses (.. js/process -env -coursesTable)}}})
1314

1415
(defn augment [& args]

0 commit comments

Comments
 (0)