mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
story: fix generator bugs
This commit is contained in:
parent
05784fcee3
commit
c02f59818e
@ -5,7 +5,7 @@
|
||||
/- *story
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[[syd=desk ~] cas=cash prz=prose ~]
|
||||
[[=desk ~] cas=cash prz=prose ~]
|
||||
==
|
||||
::
|
||||
:: XX: story set and story init both have desk and case as optional.
|
||||
@ -21,12 +21,14 @@
|
||||
p.cas
|
||||
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
||||
::
|
||||
=/ pax /(scot %p our)/[desk]/(scot cas)/story
|
||||
?. .^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
=/ pax /(scot %p our)/[desk]/(scot %da now)/story
|
||||
?: !.^(? %cu pax)
|
||||
~& >> "Error: desk {<desk>} does not exist."
|
||||
helm-pass+[%d %noop ~]
|
||||
=/ tale=story .^(story %cx pax)
|
||||
=. tale
|
||||
?: =(*prose prz)
|
||||
(~(del by tale) tak)
|
||||
(~(del ju tale) tak prz)
|
||||
:- %helm-pass
|
||||
[%c [%info syd %& [/story %ins story+!>(tale)]~]]
|
||||
[%c [%info desk %& [/story %ins story+!>(tale)]~]]
|
@ -20,7 +20,9 @@
|
||||
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
||||
::
|
||||
=/ pax /(scot %p our)/[desk]/(scot cas)/story
|
||||
?. .^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
?: !.^(? %cu pax)
|
||||
~& >> "Error: desk {<desk>} does not exist."
|
||||
helm-pass+[%d %noop ~]
|
||||
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
|
||||
=. tale (~(put ju tale) tak prose)
|
||||
:- %helm-pass
|
||||
|
@ -11,7 +11,7 @@
|
||||
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
||||
=/ cas r.bec :: use case from beak
|
||||
=/ pax /(scot %p our)/[desk]/(scot cas)/story
|
||||
?. .^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
?: !.^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
=/ tale=story .^(story %cx pax)
|
||||
=/ story-to-mime .^($-(story mime) %cf /(scot %p our)/[desk]/(scot cas)/story/mime)
|
||||
=/ tale-mime (story-to-mime tale)
|
||||
|
@ -13,7 +13,7 @@
|
||||
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
||||
=/ cas=case r.bec :: use case from beak
|
||||
=/ pax /(scot %p our)/[desk]/(scot cas)/story
|
||||
?. .^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
?: !.^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
||||
=/ tale .^(story %cx pax)
|
||||
=/ current-tako .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
||||
=/ current-yaki .^(yaki:clay %cs /(scot %p our)/[desk]/(scot cas)/yaki/(scot %uv current-tako))
|
||||
|
Loading…
Reference in New Issue
Block a user