mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 21:31:32 +03:00
21 lines
623 B
Plaintext
21 lines
623 B
Plaintext
::
|
|
::::
|
|
::
|
|
/- *story
|
|
:- %say
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
[[~] =desk overwrite=_| ~]
|
|
==
|
|
::
|
|
:: Create a story file for a given desk
|
|
::
|
|
=/ our p.bec
|
|
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
|
=/ existing-story .^(? %cu /(scot %p our)/[desk]/(scot %da now)/story)
|
|
?: ?&(existing-story !overwrite)
|
|
~& >> "Error: {<desk>}/story already exists. Set the optional parameter `overwrite` to `%.y` to forcibly wipe"
|
|
:: XX could use a better way to noop
|
|
:- %helm-pass [%d %noop ~]
|
|
=| tale=story
|
|
:- %helm-pass
|
|
[%c [%info desk %& [/story %ins story+!>(tale)]~]] |