mirror of
https://github.com/urbit/shrub.git
synced 2024-12-03 05:43:18 +03:00
33 lines
864 B
Plaintext
33 lines
864 B
Plaintext
|
:: Simple rss transformer
|
||
|
::
|
||
|
:::: /hook/xml/as-rss
|
||
|
::
|
||
|
/= sum /: /=== /% 2 /snip/
|
||
|
/^ kid=(map span ,[marl marl])
|
||
|
/: /=== /% 2 /_ /snip/
|
||
|
/$ |=([bem=beam but=path] [our=p.bem dez=q.bem tub=(flop (slag 2 but))])
|
||
|
::
|
||
|
:::: ~fyr
|
||
|
::
|
||
|
:: Link from relative path
|
||
|
=+ hok=`hart`[& ~ `/org/urbit/(rsh 3 1 (scot %p our))]
|
||
|
=+ ref=|=(a=path (earn hok `[dez %tree (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))))
|
||
|
::
|
||
|
%- crip %- poxo
|
||
|
;rss(version "2.0")
|
||
|
;channel
|
||
|
;title: *{hed.sum}
|
||
|
;link: {(ref /)}
|
||
|
;description: *{(no-meta tal.sum)}
|
||
|
;* %+ turn (~(tap by kid))
|
||
|
|= [nom=@t hed=marl tal=marl]
|
||
|
;item
|
||
|
;title: *{hed}
|
||
|
;description: *{(no-meta tal)}
|
||
|
;link: {(ref /[nom])}
|
||
|
==
|
||
|
==
|
||
|
==
|