mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +03:00
Fora is now a standalone app.
Posts notifications to journals %fora-posts and %fora-comments.
This commit is contained in:
parent
6c6e192112
commit
608533532b
91
app/fora.hoon
Normal file
91
app/fora.hoon
Normal file
@ -0,0 +1,91 @@
|
||||
::
|
||||
:: /app/fora/hoon
|
||||
::
|
||||
::TODO maybe stop relying on %hood one day.
|
||||
::
|
||||
/- talk
|
||||
/+ talk, write, time-to-id
|
||||
=, format
|
||||
=, title
|
||||
::
|
||||
|%
|
||||
++ move (pair bone card)
|
||||
++ card
|
||||
$% {$poke wire dock poke}
|
||||
{$exec wire @p $~ {beak silk:ford}}
|
||||
{$info wire @p toro:clay}
|
||||
==
|
||||
++ poke
|
||||
$% {$talk-action action:talk}
|
||||
{$write-fora-post spur ship cord cord}
|
||||
{$write-comment spur ship cord}
|
||||
==
|
||||
--
|
||||
::
|
||||
|_ {bol/bowl:gall $~}
|
||||
::
|
||||
++ prep
|
||||
|= old/(unit $~)
|
||||
^- (quip move _..prep)
|
||||
?^ old [~ ..prep(+<+ u.old)]
|
||||
:_ ..prep
|
||||
:~ (act %create %fora-posts 'fora posts' %journal)
|
||||
(act %create %fora-comments 'fora comments' %journal)
|
||||
==
|
||||
::
|
||||
++ act
|
||||
|= a/action:talk
|
||||
^- move
|
||||
[ost.bol %poke / [our.bol %talk-guardian] %talk-action a]
|
||||
::
|
||||
++ ra-base-hart .^(hart:eyre %e /(scot %p our.bol)/host/(scot %da now.bol))
|
||||
::
|
||||
++ poke-fora-post
|
||||
|= {pax/path sup/spur hed/@t txt/@t}
|
||||
^- (quip move _+>)
|
||||
:_ +>
|
||||
:~ %- act
|
||||
:+ %phrase [[our.bol %fora-posts] ~ ~]
|
||||
:_ ~
|
||||
:+ %app dap.bol
|
||||
:+ %fat
|
||||
:+ %name
|
||||
(crip "post by {(cite src.bol)}: {(trip hed)}")
|
||||
text+(to-wain txt)
|
||||
=. pax (welp pax /posts/(crip "{<now.bol>}~"))
|
||||
[%url [ra-base-hart `pax ~] ~]
|
||||
::
|
||||
:* ost.bol
|
||||
%poke
|
||||
/fora-post
|
||||
[our.bol %hood]
|
||||
[%write-fora-post sup src.bol hed txt]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ poke-fora-comment
|
||||
|= {pax/path sup/spur txt/@t}
|
||||
^- (quip move _+>)
|
||||
:_ +>
|
||||
:~ ^- move
|
||||
%- act
|
||||
:+ %phrase [[our.bol %fora-comments] ~ ~]
|
||||
:_ ~
|
||||
:+ %app dap.bol
|
||||
^- speech:talk
|
||||
:+ %fat
|
||||
:+ %name
|
||||
=+ nam=?~(sup "" (trip i.sup))
|
||||
(crip "comment by {(cite src.bol)} on /{nam}")
|
||||
text+(to-wain txt)
|
||||
=+ fra=(crip (time-to-id now.bol))
|
||||
[%url [ra-base-hart `pax ~] `fra]
|
||||
::
|
||||
:* ost.bol
|
||||
%poke
|
||||
/fora-comment
|
||||
[our.bol %hood]
|
||||
[%write-comment sup src.bol txt]
|
||||
==
|
||||
==
|
||||
--
|
Loading…
Reference in New Issue
Block a user