fix rss renderer

This commit is contained in:
Anton Dyudin 2016-02-17 15:16:33 -08:00
parent e874ce237a
commit 11341be6d7
2 changed files with 17 additions and 10 deletions

6
mar/rss-xml.hoon Normal file
View File

@ -0,0 +1,6 @@
::
:::: /hoon/rss-xml/mar
::
/? 310
::
// /===/mar/xml :: alias

View File

@ -2,19 +2,20 @@
:: ::
:::: /hoon/rss-xml/ren :::: /hoon/rss-xml/ren
:: ::
/? 314 /? 310
/= sum /snip/ /= sum /snip/
/^ kid=(map knot ,[marl marl]) /= kid /^ (map knot {marl marl})
/_ /snip/ /_ /snip/
/$ |=([bem=beam but=path] [our=p.bem tub=(slag 1 (flop but))]) /$ |=({bem/beam *} [our=p.bem tub=(slag 1 (flop s.bem))])
:: !:
:::: ~fyr :::: ~fyr, ~tasfyn-partyv
:: ::
~& [sum=sum kid=kid]
:: Link from relative path :: Link from relative path
=+ hok=`hart`[& ~ `/org/urbit/(rsh 3 1 (scot %p our))] =+ hok=`hart`[& ~ &+/org/urbit/(rsh 3 1 (scot %p our))]
=+ ref=|=(a=path (earn hok `(weld tub a) ~)) =+ ref=|=(a/path (earn hok `(weld tub a) ~))
:: urb:front attrs confuse RSS validators, readers :: urb:front attrs confuse RSS validators, readers
=+ no-meta=|=(a=marl `_a`?~(a ~ ?.(?=(%meta n.g.i.a) a $(a t.a)))) =+ no-meta=|=(a/marl ^+(a ?~(a ~ ?.(?=($meta n.g.i.a) a $(a t.a)))))
:: ::
%- crip %- poxo %- crip %- poxo
;rss(version "2.0") ;rss(version "2.0")
@ -23,7 +24,7 @@
;link: {(ref /)} ;link: {(ref /)}
;description: *{(no-meta tal.sum)} ;description: *{(no-meta tal.sum)}
;* %+ turn (~(tap by kid)) ;* %+ turn (~(tap by kid))
|= [nom=@t hed=marl tal=marl] |= {nom/@t hed/marl tal/marl}
;item ;item
;title: *{hed} ;title: *{hed}
;description: *{(no-meta tal)} ;description: *{(no-meta tal)}