shrub/ren/rss-xml.hoon

37 lines
896 B
Plaintext
Raw Normal View History

:: Simple rss transformer
::
:::: /hoon/rss-xml/ren
::
2016-02-18 02:16:33 +03:00
/? 310
2016-02-26 04:22:03 +03:00
/= sum /&snip&elem&/|(/elem/ /~[;div;])
2016-02-18 02:16:33 +03:00
/= kid /^ (map knot {marl marl})
2016-02-26 04:22:03 +03:00
/_ /&snip&/elem/
2016-02-18 02:16:33 +03:00
/$ |=({bem/beam *} [our=p.bem tub=(slag 1 (flop s.bem))])
2016-11-17 04:42:58 +03:00
::
2016-02-18 02:16:33 +03:00
:::: ~fyr, ~tasfyn-partyv
::
2016-02-26 04:22:03 +03:00
::~& [sum=sum kid=kid]
:: Link from relative path
=, eyre
=, html
2016-02-26 04:22:03 +03:00
=+ hok=.^(hart %e /(scot %p our)/host/real)
=+ ref=|=(a/path (en-purl hok `(weld tub a) ~))
:: urb:front attrs confuse RSS validators, readers
2016-02-18 02:16:33 +03:00
=+ no-meta=|=(a/marl ^+(a ?~(a ~ ?.(?=($meta n.g.i.a) a $(a t.a)))))
::
2017-10-19 01:47:41 +03:00
%- crip %- en-xml
;rss(version "2.0")
;channel
;title: *{hed.sum}
;link: {(ref /)}
;description: *{(no-meta tal.sum)}
;* %+ turn ~(tap by kid)
2016-02-18 02:16:33 +03:00
|= {nom/@t hed/marl tal/marl}
;item
;title: *{hed}
;description: *{(no-meta tal)}
;link: {(ref /[nom])}
==
==
==