Add urbit dev docs search source
commitcae52014b97636a2db7009043f1e67f78ffb08c4
authorEvangelos Lamprou <e.lamprou@upnet.gr>
dateSun 22 Oct 2023, 02:18 (3 years ago)
parent6218262
zod/seax/lib/engines.hoon+2−1
@@ -1,5 +1,5 @@
11/- *seax
2−/+ engines-yep, engines-crowdview, engines-wiby, engines-alexandria
2+/+ engines-yep, engines-crowdview, engines-wiby, engines-alexandria, engines-urbit-dev
33
44^- engines
55
@@ -10,5 +10,6 @@
1010 [name=%crowdview engine=engines-crowdview weight=.2]
1111 [name=%wiby engine=engines-wiby weight=.2]
1212 [name=%alexandria engine=engines-alexandria weight=.2]
13+ [name=%urbit-dev engine=engines-urbit-dev weight=.2]
1314==
1415
zod/seax/lib/engines/urbit-dev.hoonnew file+29
@@ -0,0 +1,29 @@
1+/- *seax
2+
3+^- engine
4+=<
5+|%
6+++ url
7+ |= query=tape
8+ ^- tape
9+ %+ weld
10+ "https://urbit.org/api/dev-search?q="
11+ (en-urlt:html query)
12+++ results
13+ |= response=mime-data:iris
14+ ^- (unit (list search-result))
15+ =/ body q.data.response
16+ ;< jon=json _biff (de:json:html body)
17+ (apex jon)
18+--
19+::
20+|%
21+++ apex
22+ =, dejs-soft:format
23+ %- ot
24+ ~[glossary+(ar parse-search-result)]
25+++ parse-search-result
26+ =, dejs-soft:format
27+ %- ot
28+ ~[[%'name' so] [%'url' so]]
29+--