This commit is contained in:
Anton Dyudin 2016-11-10 15:36:03 -08:00
parent fbe2215d1c
commit 0ee0bb486d

View File

@ -3,40 +3,48 @@
:::: /hoon/rss-xml/ren :::: /hoon/rss-xml/ren
:: ::
/? 310 /? 310
/= sum /% /&front&/|(/front/ /~[~]) /= our /$ |=({bem/beam *} p.bem)
/= top
/. /= pax /$ |=({bem/beam *} (slag 1 (flop s.bem)))
/= inf /% /&front&/|(/front/ /~[~])
==
/= kid /^ :(map knot knot cord) /= kid /^ :(map knot knot cord)
/% /_ /front/ /% /_ /front/
/$ |=({bem/beam *} [our=p.bem tub=(slag 1 (flop s.bem))])
!: !:
:::: ~fyr, ~tasfyn-partyv :::: ~fyr, ~tasfyn-partyv
:: ::
::~& [sum=sum kid=kid] |%
:: Link from relative path ++ relative-link
=+ hok=.^(hart %e /(scot %p our)/host/real) =/ external-host
=+ ref=|=(a/path (earn hok `(weld tub a) ~)) ~+(.^(hart %e /(scot %p our)/host/real))
=/ atrs |= a/path ^- tape
(earn external-host `(weld pax.top a) ~)
::
++ parse-front
|= a/(map cord cord) |= a/(map cord cord)
:* title=(fall (~(get by a) %title) '') :* title=(fall (~(get by a) %title) '')
preview=(fall (~(get by a) %preview) '') preview=(fall (~(get by a) %preview) '')
author=(fall (~(get by a) %author) '') author=(fall (~(get by a) %author) '')
date=(fall (~(get by a) %date) '') date=(fall (~(get by a) %date) '')
== ==
--
:: ::
::::
::
%- crip %- poxo %- crip %- poxo
;rss(version "2.0") ;rss(version "2.0")
:: ;raw: *{(turn (wash 0^80 >% .<) |=(a/tape ;l:"{a}"))}
;channel ;channel
;* =/ a (atrs sum) ;* =/ a (parse-front inf.top)
;= ;=
;title: {(trip title.a)} ;title: {(trip title.a)}
;link: {(ref /)} ;link: {(relative-link /)}
;description: {(trip preview.a)} ;description: {(trip preview.a)}
== ==
;* %+ turn (~(tap by kid)) ;* %+ turn (~(tap by kid))
|= {nom/@t som/(map knot cord)} |= {fyl/@t inf/(map knot cord)}
=/ a (atrs som) =/ a (parse-front inf)
;item ;item
;link: {(ref /[nom])} ;link: {(relative-link /[fyl])}
;title: {(trip title.a)} ;title: {(trip title.a)}
;author: {(trip author.a)} ;author: {(trip author.a)}
;description: {(trip preview.a)} ;description: {(trip preview.a)}