activity_mapper 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +211 -0
- data/lib/activity_mapper.rb +35 -0
- data/lib/activity_mapper/activity_data_mapper.rb +93 -0
- data/lib/activity_mapper/connector.rb +71 -0
- data/lib/activity_mapper/lexicon.txt +92662 -0
- data/lib/activity_mapper/linguistics.rb +147 -0
- data/lib/activity_mapper/service_module.rb +194 -0
- data/lib/activity_mapper/service_modules.rb +4 -0
- data/lib/activity_mapper/service_modules/delicious.rb +41 -0
- data/lib/activity_mapper/service_modules/flickr.rb +59 -0
- data/lib/activity_mapper/service_modules/twitter.rb +57 -0
- data/lib/activity_mapper/service_modules/wakoopa.rb +350 -0
- data/lib/activity_mapper/service_modules/youtube.rb +63 -0
- data/lib/extensions/uri.rb +42 -0
- data/spec/connector_mock.rb +49 -0
- data/spec/data/delicious_ac8fdf9b4e304b150bf198b42a1cb1b4.json +1 -0
- data/spec/data/delicious_ee55656e0f69242ccf02c3eb0f97b296.json +1 -0
- data/spec/data/flickr_2b826afe2906894197d92f7a41c2785c. +1 -0
- data/spec/data/flickr_3c25cf51d174ee4bb2d8673e294ce4c0.json +196 -0
- data/spec/data/flickr_482967b550afd05993ec4256fa1de388.json +229 -0
- data/spec/data/flickr_54c4b36bea4e2b14c783e5c50cba8544.json +9 -0
- data/spec/data/flickr_848ea91c1a903d0347d1029bf863132a. +1 -0
- data/spec/data/flickr_bcb82142f3d6998cabab3c82fba15ced.json +141 -0
- data/spec/data/flickr_e9d78058938c7c845a8de3a2c3526c61. +1 -0
- data/spec/data/twitter_227e1ca72a2ba08a1b03be2cd64b681e.json +274 -0
- data/spec/data/twitter_5dd0884137bf193d55d446619ec65c7e.json +1 -0
- data/spec/data/twitter_dd694fe9ebda58a84f92a859fb1cb79c.json +1 -0
- data/spec/data/wakoopa_1a8b94baf4eed4fd0e7ac39dc2f53059.json +1 -0
- data/spec/data/youtube_050e71a038359cc8ff7e00161e687b4e.json +1 -0
- data/spec/data/youtube_6d895fb0245f47b9e4fcc868d1f91674.json +1 -0
- data/spec/data/youtube_a92042581e44f9d3da548e2c7a89849c.json +1 -0
- data/spec/data/youtube_bf7b648ff8720edb1db951b7b9a474c4.json +1 -0
- data/spec/data/zemanta_suggest_for_tweet_response.xml +405 -0
- data/spec/models.rb +114 -0
- data/spec/service_modules/delicious_spec.rb +32 -0
- data/spec/service_modules/flickr_spec.rb +43 -0
- data/spec/service_modules/twitter_spec.rb +44 -0
- data/spec/service_modules/wakoopa_spec.rb +35 -0
- data/spec/service_modules/youtube_spec.rb +47 -0
- data/spec/spec_helper.rb +8 -0
- metadata +130 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearch/1.1/","xmlns$gd":"http://schemas.google.com/g/2005","gd$etag":"W/\"Ck4ARnw6cSp7ImA9WxJXE0s.\"","id":{"$t":"tag:youtube.com,2008:user:ejang:favorites"},"updated":{"$t":"2009-06-07T07:49:07.219Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#favorite"}],"title":{"$t":"Favorites of ejang"},"logo":{"$t":"http://www.youtube.com/img/pic_youtubelogo_123x63.gif"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/users/ejang?v\u003d2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/profile_favorites?user\u003dejang"},{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/users/ejang/favorites?v\u003d2"},{"rel":"http://schemas.google.com/g/2005#batch","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/users/ejang/favorites/batch?v\u003d2"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/users/ejang/favorites?alt\u003djson\u0026start-index\u003d1\u0026max-results\u003d25\u0026v\u003d2"},{"rel":"service","type":"application/atomsvc+xml","href":"http://gdata.youtube.com/feeds/api/users/ejang/favorites?alt\u003datom-service\u0026v\u003d2"}],"author":[{"name":{"$t":"ejang"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/ejang"}}],"generator":{"$t":"YouTube data API","version":"2.0","uri":"http://gdata.youtube.com/"},"openSearch$totalResults":{"$t":0},"openSearch$startIndex":{"$t":1},"openSearch$itemsPerPage":{"$t":25}}}
|
@@ -0,0 +1,405 @@
|
|
1
|
+
<rsp>
|
2
|
+
<status>ok</status>
|
3
|
+
<articles>
|
4
|
+
<article>
|
5
|
+
<url>http://www.prblogger.com/2009/01/journalist-did-you-get-my-press-release/</url>
|
6
|
+
<confidence>0.001636</confidence>
|
7
|
+
<published_datetime>2009-01-07T12:55:39Z</published_datetime>
|
8
|
+
<zemified>0</zemified>
|
9
|
+
<title>@Journalist Did you get my press release?</title>
|
10
|
+
</article><article>
|
11
|
+
<url>http://strivepr.com/2008/12/04/strivers-welcome-christmas/</url>
|
12
|
+
<confidence>0.001368</confidence>
|
13
|
+
<published_datetime>2008-12-04T11:38:27Z</published_datetime>
|
14
|
+
<zemified>1</zemified>
|
15
|
+
<title>Strivers welcome Christmas</title>
|
16
|
+
</article><article>
|
17
|
+
<url>http://strivepr.com/2009/01/08/15-january-is-thirdthusday-in-the-isle-of-man/</url>
|
18
|
+
<confidence>0.001362</confidence>
|
19
|
+
<published_datetime>2009-01-08T14:40:33Z</published_datetime>
|
20
|
+
<zemified>0</zemified>
|
21
|
+
<title>15 January is ThirdThusday in the Isle of Man</title>
|
22
|
+
</article><article>
|
23
|
+
<url>http://googlesystem.blogspot.com/2009/01/android-for-netbooks.html</url>
|
24
|
+
<confidence>0.001352</confidence>
|
25
|
+
<published_datetime>2009-01-03T16:27:00Z</published_datetime>
|
26
|
+
<zemified>0</zemified>
|
27
|
+
<title>Android for Netbooks?</title>
|
28
|
+
</article><article>
|
29
|
+
<url>http://strivepr.com/2008/11/07/junior-achievement-isle-of-man-2/</url>
|
30
|
+
<confidence>0.001203</confidence>
|
31
|
+
<published_datetime>2008-11-07T11:33:28Z</published_datetime>
|
32
|
+
<zemified>1</zemified>
|
33
|
+
<title>Junior Achievement Isle of Man</title>
|
34
|
+
</article><article>
|
35
|
+
<url>http://create-iom.com/blog/isle-of-man-recruitment-agency-launched/</url>
|
36
|
+
<confidence>0.001172</confidence>
|
37
|
+
<published_datetime>2008-11-13T21:19:42Z</published_datetime>
|
38
|
+
<zemified>1</zemified>
|
39
|
+
<title>Isle of Man Recruitment Agency Launched</title>
|
40
|
+
</article><article>
|
41
|
+
<url>http://www.u-g-h.com/2008/12/03/top-5-manx-tweeters/</url>
|
42
|
+
<confidence>0.001166</confidence>
|
43
|
+
<published_datetime>2008-12-03T23:15:28Z</published_datetime>
|
44
|
+
<zemified>1</zemified>
|
45
|
+
<title>Top 5 Manx Tweeters</title>
|
46
|
+
</article><article>
|
47
|
+
<url>http://laist.com/2008/12/22/box_office_review_yes.php</url>
|
48
|
+
<confidence>0.001164</confidence>
|
49
|
+
<published_datetime>2008-12-22T16:00:00Z</published_datetime>
|
50
|
+
<zemified>0</zemified>
|
51
|
+
<title>Box Office Review: No! Yes!</title>
|
52
|
+
</article><article>
|
53
|
+
<url>http://www.cbsnews.com/stories/2009/01/07/ap/strange/main4705221.shtml?source=RSS&attr=_4705221</url>
|
54
|
+
<confidence>0.001146</confidence>
|
55
|
+
<published_datetime>2009-01-07T21:27:23Z</published_datetime>
|
56
|
+
<zemified>0</zemified>
|
57
|
+
<title>Man Accused Of Urinating On Bouncer At Alaska Bar</title>
|
58
|
+
</article><article>
|
59
|
+
<url>http://www.socialmediatoday.com/SMC/55901</url>
|
60
|
+
<confidence>0.001139</confidence>
|
61
|
+
<published_datetime>2008-11-10T13:36:21Z</published_datetime>
|
62
|
+
<zemified>0</zemified>
|
63
|
+
<title>More tips on supercharging your PR efforts with Twitter (a case study in open source PR)</title>
|
64
|
+
</article>
|
65
|
+
</articles><markup>
|
66
|
+
<text>@pr1001 @sjoert &quot;I&apos;m a bad man, and not ashamed of it&quot;\u266b ;-)</text>
|
67
|
+
</markup><images>
|
68
|
+
<image>
|
69
|
+
<url_m_h>151</url_m_h>
|
70
|
+
<confidence>0.765693</confidence>
|
71
|
+
<url_s_h>56</url_s_h>
|
72
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:The_Man_from_U.N.C.L.E.jpg">Wikipedia</a></attribution>
|
73
|
+
<description>The Man from U.N.C.L.E.</description>
|
74
|
+
<license>Non-free, could qualify as fair use</license>
|
75
|
+
<url_l_w>310</url_l_w>
|
76
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/d/de/The_Man_from_U.N.C.L.E.jpg/75px-The_Man_from_U.N.C.L.E.jpg</url_s>
|
77
|
+
<source_url>http://en.wikipedia.org/wiki/Image:The_Man_from_U.N.C.L.E.jpg</source_url>
|
78
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/d/de/The_Man_from_U.N.C.L.E.jpg/202px-The_Man_from_U.N.C.L.E.jpg</url_m>
|
79
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/d/de/The_Man_from_U.N.C.L.E.jpg</url_l>
|
80
|
+
<url_l_h>231</url_l_h>
|
81
|
+
<url_s_w>75</url_s_w>
|
82
|
+
<url_m_w>202</url_m_w>
|
83
|
+
</image><image>
|
84
|
+
<url_m_h>210</url_m_h>
|
85
|
+
<confidence>0.53465</confidence>
|
86
|
+
<url_s_h>78</url_s_h>
|
87
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:IoM.JPG">Wikipedia</a></attribution>
|
88
|
+
<description>A satellite image of the Isle of Man.</description>
|
89
|
+
<license>Public domain</license>
|
90
|
+
<url_l_w>245</url_l_w>
|
91
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/IoM.JPG/75px-IoM.JPG</url_s>
|
92
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:IoM.JPG</source_url>
|
93
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/IoM.JPG/202px-IoM.JPG</url_m>
|
94
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/8/8b/IoM.JPG</url_l>
|
95
|
+
<url_l_h>255</url_l_h>
|
96
|
+
<url_s_w>75</url_s_w>
|
97
|
+
<url_m_w>202</url_m_w>
|
98
|
+
</image><image>
|
99
|
+
<url_m_h>152</url_m_h>
|
100
|
+
<confidence>0.509928</confidence>
|
101
|
+
<url_s_h>56</url_s_h>
|
102
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Manx_loaghtan.jpg">Wikipedia</a></attribution>
|
103
|
+
<description>Photograph of Manx Loaghtan sheep taken at The Grove Rural Life Museum, Ramsey, Isle of Man on 30 September 2005</description>
|
104
|
+
<license>Public domain</license>
|
105
|
+
<url_l_w>1024</url_l_w>
|
106
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Manx_loaghtan.jpg/75px-Manx_loaghtan.jpg</url_s>
|
107
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Manx_loaghtan.jpg</source_url>
|
108
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Manx_loaghtan.jpg/202px-Manx_loaghtan.jpg</url_m>
|
109
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/1/11/Manx_loaghtan.jpg</url_l>
|
110
|
+
<url_l_h>768</url_l_h>
|
111
|
+
<url_s_w>75</url_s_w>
|
112
|
+
<url_m_w>202</url_m_w>
|
113
|
+
</image><image>
|
114
|
+
<url_m_h>185</url_m_h>
|
115
|
+
<confidence>0.471673</confidence>
|
116
|
+
<url_s_h>69</url_s_h>
|
117
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Isle_of_Man_map-en.svg">Wikipedia</a></attribution>
|
118
|
+
<description>Map in English of the Isle of Man. Note : The shaded relief is a raster image embedded in the SVG.</description>
|
119
|
+
<license>CC Attribution ShareAlike 2.5 license</license>
|
120
|
+
<url_l_w>1200</url_l_w>
|
121
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Isle_of_Man_map-en.svg/75px-Isle_of_Man_map-en.svg.png</url_s>
|
122
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Isle_of_Man_map-en.svg</source_url>
|
123
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Isle_of_Man_map-en.svg/202px-Isle_of_Man_map-en.svg.png</url_m>
|
124
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/6/63/Isle_of_Man_map-en.svg</url_l>
|
125
|
+
<url_l_h>1100</url_l_h>
|
126
|
+
<url_s_w>75</url_s_w>
|
127
|
+
<url_m_w>202</url_m_w>
|
128
|
+
</image><image>
|
129
|
+
<url_m_h>185</url_m_h>
|
130
|
+
<confidence>0.4715</confidence>
|
131
|
+
<url_s_h>69</url_s_h>
|
132
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:IsleOfMan_SheadingsAndParishes-en.svg">Wikipedia</a></attribution>
|
133
|
+
<description>Map in english of the Isle of Man, with bounds of sheadings, towns, villages, districts and parishes.</description>
|
134
|
+
<license>CC Attribution ShareAlike 2.5 license</license>
|
135
|
+
<url_l_w>1200</url_l_w>
|
136
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/IsleOfMan_SheadingsAndParishes-en.svg/75px-IsleOfMan_SheadingsAndParishes-en.svg.png</url_s>
|
137
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:IsleOfMan_SheadingsAndParishes-en.svg</source_url>
|
138
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/IsleOfMan_SheadingsAndParishes-en.svg/202px-IsleOfMan_SheadingsAndParishes-en.svg.png</url_m>
|
139
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/b/b9/IsleOfMan_SheadingsAndParishes-en.svg</url_l>
|
140
|
+
<url_l_h>1100</url_l_h>
|
141
|
+
<url_s_w>75</url_s_w>
|
142
|
+
<url_m_w>202</url_m_w>
|
143
|
+
</image><image>
|
144
|
+
<url_m_h>152</url_m_h>
|
145
|
+
<confidence>0.463686</confidence>
|
146
|
+
<url_s_h>56</url_s_h>
|
147
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Isle_of_Man_Peel_Castle.jpg">Wikipedia</a></attribution>
|
148
|
+
<description>Peel Castle at Peel, Isle of Man</description>
|
149
|
+
<license>Public domain</license>
|
150
|
+
<url_l_w>2272</url_l_w>
|
151
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Isle_of_Man_Peel_Castle.jpg/75px-Isle_of_Man_Peel_Castle.jpg</url_s>
|
152
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Isle_of_Man_Peel_Castle.jpg</source_url>
|
153
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Isle_of_Man_Peel_Castle.jpg/202px-Isle_of_Man_Peel_Castle.jpg</url_m>
|
154
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/4/4a/Isle_of_Man_Peel_Castle.jpg</url_l>
|
155
|
+
<url_l_h>1704</url_l_h>
|
156
|
+
<url_s_w>75</url_s_w>
|
157
|
+
<url_m_w>202</url_m_w>
|
158
|
+
</image><image>
|
159
|
+
<url_m_h>272</url_m_h>
|
160
|
+
<confidence>0.437642</confidence>
|
161
|
+
<url_s_h>101</url_s_h>
|
162
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:ManFromUNCLEbook.jpg">Wikipedia</a></attribution>
|
163
|
+
<description>Rare children's storybook based upon The Man from U.N.C.L.E. Left to right: David McCallum, Robert Vaughn and Leo G. Carroll.</description>
|
164
|
+
<license>Non-free, could qualify as fair use</license>
|
165
|
+
<url_l_w>1212</url_l_w>
|
166
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/e/e9/ManFromUNCLEbook.jpg/75px-ManFromUNCLEbook.jpg</url_s>
|
167
|
+
<source_url>http://en.wikipedia.org/wiki/Image:ManFromUNCLEbook.jpg</source_url>
|
168
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/e/e9/ManFromUNCLEbook.jpg/202px-ManFromUNCLEbook.jpg</url_m>
|
169
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/e/e9/ManFromUNCLEbook.jpg</url_l>
|
170
|
+
<url_l_h>1634</url_l_h>
|
171
|
+
<url_s_w>75</url_s_w>
|
172
|
+
<url_m_w>202</url_m_w>
|
173
|
+
</image><image>
|
174
|
+
<url_m_h>152</url_m_h>
|
175
|
+
<confidence>0.437558</confidence>
|
176
|
+
<url_s_h>56</url_s_h>
|
177
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Sound_IOM.JPG">Wikipedia</a></attribution>
|
178
|
+
<description>The Calf of Man seen from Cregneash.</description>
|
179
|
+
<license>Public domain</license>
|
180
|
+
<url_l_w>2048</url_l_w>
|
181
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Sound_IOM.JPG/75px-Sound_IOM.JPG</url_s>
|
182
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Sound_IOM.JPG</source_url>
|
183
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Sound_IOM.JPG/202px-Sound_IOM.JPG</url_m>
|
184
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/2/25/Sound_IOM.JPG</url_l>
|
185
|
+
<url_l_h>1536</url_l_h>
|
186
|
+
<url_s_w>75</url_s_w>
|
187
|
+
<url_m_w>202</url_m_w>
|
188
|
+
</image><image>
|
189
|
+
<url_m_h>341</url_m_h>
|
190
|
+
<confidence>0.421927</confidence>
|
191
|
+
<url_s_h>127</url_s_h>
|
192
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:ManfromUncle1.jpg">Wikipedia</a></attribution>
|
193
|
+
<description>The first Man from U.N.C.L.E. novel, by Michael Avallone. Pictured: Robert Vaughn.</description>
|
194
|
+
<license>Non-free, could qualify as fair use</license>
|
195
|
+
<url_l_w>1240</url_l_w>
|
196
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/3/31/ManfromUncle1.jpg/75px-ManfromUncle1.jpg</url_s>
|
197
|
+
<source_url>http://en.wikipedia.org/wiki/Image:ManfromUncle1.jpg</source_url>
|
198
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/3/31/ManfromUncle1.jpg/202px-ManfromUncle1.jpg</url_m>
|
199
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/3/31/ManfromUncle1.jpg</url_l>
|
200
|
+
<url_l_h>2092</url_l_h>
|
201
|
+
<url_s_w>75</url_s_w>
|
202
|
+
<url_m_w>202</url_m_w>
|
203
|
+
</image><image>
|
204
|
+
<url_m_h>353</url_m_h>
|
205
|
+
<confidence>0.391581</confidence>
|
206
|
+
<url_s_h>131</url_s_h>
|
207
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:British_Isles_Isle_of_Man.svg">Wikipedia</a></attribution>
|
208
|
+
<description>map showing the Isle of Man in relation to Great Britain and Ireland</description>
|
209
|
+
<license>Public domain</license>
|
210
|
+
<url_l_w>675</url_l_w>
|
211
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/British_Isles_Isle_of_Man.svg/75px-British_Isles_Isle_of_Man.svg.png</url_s>
|
212
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:British_Isles_Isle_of_Man.svg</source_url>
|
213
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/British_Isles_Isle_of_Man.svg/202px-British_Isles_Isle_of_Man.svg.png</url_m>
|
214
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/9/9e/British_Isles_Isle_of_Man.svg</url_l>
|
215
|
+
<url_l_h>1180</url_l_h>
|
216
|
+
<url_s_w>75</url_s_w>
|
217
|
+
<url_m_w>202</url_m_w>
|
218
|
+
</image><image>
|
219
|
+
<url_m_h>133</url_m_h>
|
220
|
+
<confidence>0.38519</confidence>
|
221
|
+
<url_s_h>49</url_s_h>
|
222
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Douglas_Isle_of_Man_welcome_sign.jpg">Wikipedia</a></attribution>
|
223
|
+
<description>A bilingual sign on the Isle of Man featuring Manx Gaelic and English.</description>
|
224
|
+
<license>CC Attribution ShareAlike 1.0 license</license>
|
225
|
+
<url_l_w>574</url_l_w>
|
226
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Douglas_Isle_of_Man_welcome_sign.jpg/75px-Douglas_Isle_of_Man_welcome_sign.jpg</url_s>
|
227
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Douglas_Isle_of_Man_welcome_sign.jpg</source_url>
|
228
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Douglas_Isle_of_Man_welcome_sign.jpg/202px-Douglas_Isle_of_Man_welcome_sign.jpg</url_m>
|
229
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/c/c4/Douglas_Isle_of_Man_welcome_sign.jpg</url_l>
|
230
|
+
<url_l_h>378</url_l_h>
|
231
|
+
<url_s_w>75</url_s_w>
|
232
|
+
<url_m_w>202</url_m_w>
|
233
|
+
</image><image>
|
234
|
+
<url_m_h>177</url_m_h>
|
235
|
+
<confidence>0.360302</confidence>
|
236
|
+
<url_s_h>66</url_s_h>
|
237
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Manx_Triskelion.png">Wikipedia</a></attribution>
|
238
|
+
<description>Manx triskelion.</description>
|
239
|
+
<license>Public domain</license>
|
240
|
+
<url_l_w>236</url_l_w>
|
241
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Manx_Triskelion.png/75px-Manx_Triskelion.png</url_s>
|
242
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Manx_Triskelion.png</source_url>
|
243
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Manx_Triskelion.png/202px-Manx_Triskelion.png</url_m>
|
244
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/1/15/Manx_Triskelion.png</url_l>
|
245
|
+
<url_l_h>207</url_l_h>
|
246
|
+
<url_s_w>75</url_s_w>
|
247
|
+
<url_m_w>202</url_m_w>
|
248
|
+
</image><image>
|
249
|
+
<url_m_h>148</url_m_h>
|
250
|
+
<confidence>0.322363</confidence>
|
251
|
+
<url_s_h>55</url_s_h>
|
252
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Carte_Europe_1843.jpg">Wikipedia</a></attribution>
|
253
|
+
<description>old maps from histoirepostale.</description>
|
254
|
+
<license>CC Attribution ShareAlike 3.0 license</license>
|
255
|
+
<url_l_w>3369</url_l_w>
|
256
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Carte_Europe_1843.jpg/75px-Carte_Europe_1843.jpg</url_s>
|
257
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Carte_Europe_1843.jpg</source_url>
|
258
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Carte_Europe_1843.jpg/202px-Carte_Europe_1843.jpg</url_m>
|
259
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/9/9c/Carte_Europe_1843.jpg</url_l>
|
260
|
+
<url_l_h>2475</url_l_h>
|
261
|
+
<url_s_w>75</url_s_w>
|
262
|
+
<url_m_w>202</url_m_w>
|
263
|
+
</image><image>
|
264
|
+
<url_m_h>111</url_m_h>
|
265
|
+
<confidence>0.322042</confidence>
|
266
|
+
<url_s_h>41</url_s_h>
|
267
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:Vegetation_Europe.png">Wikipedia</a></attribution>
|
268
|
+
<description>Vegetation in Europe (see also: :Image:Europe biogeography countries.</description>
|
269
|
+
<license>CC Attribution ShareAlike 2.5 license</license>
|
270
|
+
<url_l_w>288</url_l_w>
|
271
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Vegetation_Europe.png/75px-Vegetation_Europe.png</url_s>
|
272
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:Vegetation_Europe.png</source_url>
|
273
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Vegetation_Europe.png/202px-Vegetation_Europe.png</url_m>
|
274
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/c/c5/Vegetation_Europe.png</url_l>
|
275
|
+
<url_l_h>158</url_l_h>
|
276
|
+
<url_s_w>75</url_s_w>
|
277
|
+
<url_m_w>202</url_m_w>
|
278
|
+
</image><image>
|
279
|
+
<url_m_h>152</url_m_h>
|
280
|
+
<confidence>0.321327</confidence>
|
281
|
+
<url_s_h>57</url_s_h>
|
282
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:Europe%2C_EU.png">Wikipedia</a></attribution>
|
283
|
+
<description>Eu, Candidates and the rest of the Europe</description>
|
284
|
+
<license>Public domain</license>
|
285
|
+
<url_l_w>1231</url_l_w>
|
286
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/1/15/Europe%2C_EU.png/75px-Europe%2C_EU.png</url_s>
|
287
|
+
<source_url>http://en.wikipedia.org/wiki/Image:Europe%2C_EU.png</source_url>
|
288
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/1/15/Europe%2C_EU.png/202px-Europe%2C_EU.png</url_m>
|
289
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/1/15/Europe%2C_EU.png</url_l>
|
290
|
+
<url_l_h>929</url_l_h>
|
291
|
+
<url_s_w>75</url_s_w>
|
292
|
+
<url_m_w>202</url_m_w>
|
293
|
+
</image><image>
|
294
|
+
<url_m_h>143</url_m_h>
|
295
|
+
<confidence>0.321295</confidence>
|
296
|
+
<url_s_h>53</url_s_h>
|
297
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:Map-Coeurope.jpg">Wikipedia</a></attribution>
|
298
|
+
<description>Council of Europe's definition of Europe</description>
|
299
|
+
<license>Public domain</license>
|
300
|
+
<url_l_w>838</url_l_w>
|
301
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/d/dd/Map-Coeurope.jpg/75px-Map-Coeurope.jpg</url_s>
|
302
|
+
<source_url>http://en.wikipedia.org/wiki/Image:Map-Coeurope.jpg</source_url>
|
303
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/d/dd/Map-Coeurope.jpg/202px-Map-Coeurope.jpg</url_m>
|
304
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/d/dd/Map-Coeurope.jpg</url_l>
|
305
|
+
<url_l_h>593</url_l_h>
|
306
|
+
<url_s_w>75</url_s_w>
|
307
|
+
<url_m_w>202</url_m_w>
|
308
|
+
</image><image>
|
309
|
+
<url_m_h>124</url_m_h>
|
310
|
+
<confidence>0.320971</confidence>
|
311
|
+
<url_s_h>46</url_s_h>
|
312
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:Europe_gdp_real_growth_rate_-_2007.PNG">Wikipedia</a></attribution>
|
313
|
+
<description>GDP real growth rate in Europe</description>
|
314
|
+
<license>Public domain</license>
|
315
|
+
<url_l_w>341</url_l_w>
|
316
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/1/19/Europe_gdp_real_growth_rate_-_2007.PNG/75px-Europe_gdp_real_growth_rate_-_2007.PNG</url_s>
|
317
|
+
<source_url>http://en.wikipedia.org/wiki/Image:Europe_gdp_real_growth_rate_-_2007.PNG</source_url>
|
318
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/1/19/Europe_gdp_real_growth_rate_-_2007.PNG/202px-Europe_gdp_real_growth_rate_-_2007.PNG</url_m>
|
319
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/1/19/Europe_gdp_real_growth_rate_-_2007.PNG</url_l>
|
320
|
+
<url_l_h>209</url_l_h>
|
321
|
+
<url_s_w>75</url_s_w>
|
322
|
+
<url_m_w>202</url_m_w>
|
323
|
+
</image><image>
|
324
|
+
<url_m_h>146</url_m_h>
|
325
|
+
<confidence>0.319408</confidence>
|
326
|
+
<url_s_h>54</url_s_h>
|
327
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:WWI_end.jpg">Wikipedia</a></attribution>
|
328
|
+
<description>Europe 1918</description>
|
329
|
+
<license>Public domain</license>
|
330
|
+
<url_l_w>1198</url_l_w>
|
331
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/5/5a/WWI_end.jpg/75px-WWI_end.jpg</url_s>
|
332
|
+
<source_url>http://en.wikipedia.org/wiki/Image:WWI_end.jpg</source_url>
|
333
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/5/5a/WWI_end.jpg/202px-WWI_end.jpg</url_m>
|
334
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/5/5a/WWI_end.jpg</url_l>
|
335
|
+
<url_l_h>863</url_l_h>
|
336
|
+
<url_s_w>75</url_s_w>
|
337
|
+
<url_m_w>202</url_m_w>
|
338
|
+
</image><image>
|
339
|
+
<url_m_h>103</url_m_h>
|
340
|
+
<confidence>0.288821</confidence>
|
341
|
+
<url_s_h>38</url_s_h>
|
342
|
+
<attribution>Image via <a href="http://commons.wikipedia.org/wiki/Image:TV-introduction-world-map.svg">Wikipedia</a></attribution>
|
343
|
+
<description>{{legend|#ff0000|1930 to 1939}} {{legend|#ff5400|1940 to 1949}} {{legend|#ffa800|1950 to 1959}} {{legend|#ffff00|1960 to 1969}} {{legend|#a8ff00|1970 to 1979}} {{legend|#54ff00|1980 to 1989}} {{legend|#00ff00|1990 to 1999}} {{legend|Grey|No data}}</description>
|
344
|
+
<license>Public domain</license>
|
345
|
+
<url_l_w>940</url_l_w>
|
346
|
+
<url_s>http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/TV-introduction-world-map.svg/75px-TV-introduction-world-map.svg.png</url_s>
|
347
|
+
<source_url>http://commons.wikipedia.org/wiki/Image:TV-introduction-world-map.svg</source_url>
|
348
|
+
<url_m>http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/TV-introduction-world-map.svg/202px-TV-introduction-world-map.svg.png</url_m>
|
349
|
+
<url_l>http://upload.wikimedia.org/wikipedia/commons/1/1a/TV-introduction-world-map.svg</url_l>
|
350
|
+
<url_l_h>477</url_l_h>
|
351
|
+
<url_s_w>75</url_s_w>
|
352
|
+
<url_m_w>202</url_m_w>
|
353
|
+
</image><image>
|
354
|
+
<url_m_h>202</url_m_h>
|
355
|
+
<confidence>0.281531</confidence>
|
356
|
+
<url_s_h>75</url_s_h>
|
357
|
+
<attribution>Image via <a href="http://en.wikipedia.org/wiki/Image:In_Defense_of_the_Genre.jpg">Wikipedia</a></attribution>
|
358
|
+
<description>In Defense of the Genre album cover</description>
|
359
|
+
<license>Non-free, could qualify as fair use</license>
|
360
|
+
<url_l_w>599</url_l_w>
|
361
|
+
<url_s>http://upload.wikimedia.org/wikipedia/en/thumb/f/f2/In_Defense_of_the_Genre.jpg/75px-In_Defense_of_the_Genre.jpg</url_s>
|
362
|
+
<source_url>http://en.wikipedia.org/wiki/Image:In_Defense_of_the_Genre.jpg</source_url>
|
363
|
+
<url_m>http://upload.wikimedia.org/wikipedia/en/thumb/f/f2/In_Defense_of_the_Genre.jpg/202px-In_Defense_of_the_Genre.jpg</url_m>
|
364
|
+
<url_l>http://upload.wikimedia.org/wikipedia/en/f/f2/In_Defense_of_the_Genre.jpg</url_l>
|
365
|
+
<url_l_h>600</url_l_h>
|
366
|
+
<url_s_w>75</url_s_w>
|
367
|
+
<url_m_w>202</url_m_w>
|
368
|
+
</image>
|
369
|
+
</images><signature><div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/840fc157-57e3-4698-8e39-1314394c8184/" title="Zemified by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=840fc157-57e3-4698-8e39-1314394c8184" alt="Reblog this post [with Zemanta]" /></a></div></signature>
|
370
|
+
<keywords>
|
371
|
+
<keyword>
|
372
|
+
<confidence>0.212814</confidence>
|
373
|
+
<scheme>general</scheme>
|
374
|
+
<name>Isle of Man</name>
|
375
|
+
</keyword><keyword>
|
376
|
+
<confidence>0.09721</confidence>
|
377
|
+
<scheme>general</scheme>
|
378
|
+
<name>Arts</name>
|
379
|
+
</keyword><keyword>
|
380
|
+
<confidence>0.070083</confidence>
|
381
|
+
<scheme>general</scheme>
|
382
|
+
<name>Movies</name>
|
383
|
+
</keyword><keyword>
|
384
|
+
<confidence>0.062992</confidence>
|
385
|
+
<scheme>general</scheme>
|
386
|
+
<name>Public relations</name>
|
387
|
+
</keyword><keyword>
|
388
|
+
<confidence>0.049783</confidence>
|
389
|
+
<scheme>general</scheme>
|
390
|
+
<name>Society and Culture</name>
|
391
|
+
</keyword><keyword>
|
392
|
+
<confidence>0.042346</confidence>
|
393
|
+
<scheme>general</scheme>
|
394
|
+
<name>Twitter</name>
|
395
|
+
</keyword><keyword>
|
396
|
+
<confidence>0.041526</confidence>
|
397
|
+
<scheme>general</scheme>
|
398
|
+
<name>Television</name>
|
399
|
+
</keyword><keyword>
|
400
|
+
<confidence>0.041526</confidence>
|
401
|
+
<scheme>general</scheme>
|
402
|
+
<name>Programs</name>
|
403
|
+
</keyword>
|
404
|
+
</keywords><rid>840fc157-57e3-4698-8e39-1314394c8184</rid>
|
405
|
+
</rsp>
|
data/spec/models.rb
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
|
2
|
+
# For this example, we're using OpenStruct as a storage system.
|
3
|
+
# Normally one would use DataMapper or ActiveRecord
|
4
|
+
|
5
|
+
require 'ostruct'
|
6
|
+
|
7
|
+
class PersistentObject < OpenStruct
|
8
|
+
|
9
|
+
attr_accessor :id
|
10
|
+
|
11
|
+
def self.create(*arg)
|
12
|
+
self.new(*arg)
|
13
|
+
end
|
14
|
+
|
15
|
+
def update_attributes(attrs)
|
16
|
+
attrs.each do |name, value|
|
17
|
+
self.send("#{name}=", value)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
# -- All objects below need to be defined in order for activity_mapper to function
|
24
|
+
|
25
|
+
# Your base user object
|
26
|
+
class User < PersistentObject; end
|
27
|
+
|
28
|
+
# Profile information: username, native_id, url
|
29
|
+
class ServiceProfile < PersistentObject
|
30
|
+
|
31
|
+
# belongs_to :user, implement me!
|
32
|
+
# has_many :activities, implement me!
|
33
|
+
def initialize(*arg); super(*arg); @activities = []; end
|
34
|
+
attr_accessor :activities
|
35
|
+
|
36
|
+
# -- All below is code necessary for routing to the proper service module (based on URL)
|
37
|
+
|
38
|
+
def create_or_update_summary!(*arg); service_module ? service_module.create_or_update_summary!(*arg) : nil; end
|
39
|
+
def aggregate_activity!(*arg); service_module ? service_module.aggregate_activity!(*arg) : nil; end
|
40
|
+
def analyze_this(*arg); service_module ? service_module.analyze_this(*arg) : nil; end
|
41
|
+
|
42
|
+
def service_module
|
43
|
+
return @service_module if @service_module
|
44
|
+
if (service_module_klass = ActivityMapper::ServiceModule.klass_for(url))
|
45
|
+
@service_module = service_module_klass.new(self)
|
46
|
+
else
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
# The actual event that happened: caption, occurred_at, url, reference to ActivityObject
|
54
|
+
class Activity < PersistentObject
|
55
|
+
|
56
|
+
# has_one :object, implement me!
|
57
|
+
|
58
|
+
# Implement anti-duplication mechanisms here
|
59
|
+
def self.exists?(user_id, entry)
|
60
|
+
false
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
# The object that's referenced by the event: title, body, url, created_at
|
66
|
+
class ActivityObject < PersistentObject
|
67
|
+
|
68
|
+
def self.fetch(content_identifier, activity_object_type_id)
|
69
|
+
nil
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.content_identifier(url)
|
73
|
+
MD5.hexdigest(url)
|
74
|
+
end
|
75
|
+
|
76
|
+
# To support space separated tags from APIs
|
77
|
+
def spaced_tags=(value)
|
78
|
+
self.tag_list = value.to_s.split(' ')
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
# Optional object that holds ranking/stats information
|
84
|
+
class RatingSummary < PersistentObject; end
|
85
|
+
|
86
|
+
# Hold media information
|
87
|
+
class Media < PersistentObject; end
|
88
|
+
|
89
|
+
# See activitystrea.ms for more verbs
|
90
|
+
class ActivityVerb < PersistentObject
|
91
|
+
|
92
|
+
# Constant Cache
|
93
|
+
POST = ActivityVerb.new(:id => 1)
|
94
|
+
FAVORITE = ActivityVerb.new(:id => 2)
|
95
|
+
RECENTLY_USED = ActivityVerb.new(:id => 3)
|
96
|
+
NEWLY_USED = ActivityVerb.new(:id => 4)
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
# See activitystrea.ms for more types
|
101
|
+
class ActivityObjectType < PersistentObject
|
102
|
+
|
103
|
+
# Constant Cache
|
104
|
+
STATUS = ActivityObjectType.new(:id => 1)
|
105
|
+
BOOKMARK = ActivityObjectType.new(:id => 2)
|
106
|
+
PHOTO = ActivityObjectType.new(:id => 3)
|
107
|
+
VIDEO = ActivityObjectType.new(:id => 4)
|
108
|
+
SONG = ActivityObjectType.new(:id => 5)
|
109
|
+
MIXED = ActivityObjectType.new(:id => 6)
|
110
|
+
SOFTWARE = ActivityObjectType.new(:id => 7)
|
111
|
+
SLIDESHOW = ActivityObjectType.new(:id => 8)
|
112
|
+
|
113
|
+
end
|
114
|
+
|