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
::
/? 314
/? 310
/= sum /snip/
/^ kid=(map knot ,[marl marl])
/_ /snip/
/$ |=([bem=beam but=path] [our=p.bem tub=(slag 1 (flop but))])
::
:::: ~fyr
/= kid /^ (map knot {marl marl})
/_ /snip/
/$ |=({bem/beam *} [our=p.bem tub=(slag 1 (flop s.bem))])
!:
:::: ~fyr, ~tasfyn-partyv
::
~& [sum=sum kid=kid]
:: Link from relative path
=+ hok=`hart`[& ~ `/org/urbit/(rsh 3 1 (scot %p our))]
=+ ref=|=(a=path (earn hok `(weld tub a) ~))
=+ hok=`hart`[& ~ &+/org/urbit/(rsh 3 1 (scot %p our))]
=+ ref=|=(a/path (earn hok `(weld tub a) ~))
:: 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
;rss(version "2.0")
@ -23,7 +24,7 @@
;link: {(ref /)}
;description: *{(no-meta tal.sum)}
;* %+ turn (~(tap by kid))
|= [nom=@t hed=marl tal=marl]
|= {nom/@t hed/marl tal/marl}
;item
;title: *{hed}
;description: *{(no-meta tal)}