mirror of
https://github.com/ilyakooo0/seax.git
synced 2024-09-11 12:05:27 +03:00
Add urbit dev docs search source
This commit is contained in:
parent
6218262d00
commit
cae52014b9
@ -1,5 +1,5 @@
|
||||
/- *seax
|
||||
/+ engines-yep, engines-crowdview, engines-wiby, engines-alexandria
|
||||
/+ engines-yep, engines-crowdview, engines-wiby, engines-alexandria, engines-urbit-dev
|
||||
|
||||
^- engines
|
||||
|
||||
@ -10,5 +10,6 @@
|
||||
[name=%crowdview engine=engines-crowdview weight=.2]
|
||||
[name=%wiby engine=engines-wiby weight=.2]
|
||||
[name=%alexandria engine=engines-alexandria weight=.2]
|
||||
[name=%urbit-dev engine=engines-urbit-dev weight=.2]
|
||||
==
|
||||
|
||||
|
29
zod/seax/lib/engines/urbit-dev.hoon
Normal file
29
zod/seax/lib/engines/urbit-dev.hoon
Normal file
@ -0,0 +1,29 @@
|
||||
/- *seax
|
||||
|
||||
^- engine
|
||||
=<
|
||||
|%
|
||||
++ url
|
||||
|= query=tape
|
||||
^- tape
|
||||
%+ weld
|
||||
"https://urbit.org/api/dev-search?q="
|
||||
(en-urlt:html query)
|
||||
++ results
|
||||
|= response=mime-data:iris
|
||||
^- (unit (list search-result))
|
||||
=/ body q.data.response
|
||||
;< jon=json _biff (de:json:html body)
|
||||
(apex jon)
|
||||
--
|
||||
::
|
||||
|%
|
||||
++ apex
|
||||
=, dejs-soft:format
|
||||
%- ot
|
||||
~[glossary+(ar parse-search-result)]
|
||||
++ parse-search-result
|
||||
=, dejs-soft:format
|
||||
%- ot
|
||||
~[[%'name' so] [%'url' so]]
|
||||
--
|
Loading…
Reference in New Issue
Block a user