2021-12-14 22:31:38 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
2022-01-30 23:58:35 +03:00
|
|
|
/- *story
|
2021-12-14 22:31:38 +03:00
|
|
|
:- %say
|
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
2022-01-20 23:56:47 +03:00
|
|
|
[[~] =desk overwrite=_| ~]
|
2021-12-14 22:31:38 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
:: Create a story file for a given desk
|
|
|
|
::
|
|
|
|
=/ our p.bec
|
|
|
|
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
2022-01-25 22:54:30 +03:00
|
|
|
=/ existing-story .^(? %cu /(scot %p our)/[desk]/(scot %da now)/story)
|
2022-01-20 23:56:47 +03:00
|
|
|
?: ?&(existing-story !overwrite)
|
2022-01-30 23:58:35 +03:00
|
|
|
~& >> "Error: {<desk>}/story already exists. Set the optional parameter `overwrite` to `%.y` to forcibly wipe"
|
|
|
|
:: XX could use a better way to noop
|
2022-01-20 23:56:47 +03:00
|
|
|
:- %helm-pass [%d %noop ~]
|
|
|
|
=| tale=story
|
2021-12-14 22:31:38 +03:00
|
|
|
:- %helm-pass
|
|
|
|
[%c [%info desk %& [/story %ins story+!>(tale)]~]]
|