story: fix generator bugs

This commit is contained in:
Yaseen 2022-02-18 18:51:37 -05:00
parent 05784fcee3
commit c02f59818e
4 changed files with 11 additions and 7 deletions

View File

@ -5,7 +5,7 @@
/- *story /- *story
:- %say :- %say
|= $: [now=@da eny=@uvJ bec=beak] |= $: [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. :: XX: story set and story init both have desk and case as optional.
@ -21,12 +21,14 @@
p.cas p.cas
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
:: ::
=/ pax /(scot %p our)/[desk]/(scot cas)/story =/ pax /(scot %p our)/[desk]/(scot %da now)/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 pax) =/ tale=story .^(story %cx pax)
=. tale =. tale
?: =(*prose prz) ?: =(*prose prz)
(~(del by tale) tak) (~(del by tale) tak)
(~(del ju tale) tak prz) (~(del ju tale) tak prz)
:- %helm-pass :- %helm-pass
[%c [%info syd %& [/story %ins story+!>(tale)]~]] [%c [%info desk %& [/story %ins story+!>(tale)]~]]

View File

@ -20,7 +20,9 @@
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
:: ::
=/ pax /(scot %p our)/[desk]/(scot cas)/story =/ 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=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
=. tale (~(put ju tale) tak prose) =. tale (~(put ju tale) tak prose)
:- %helm-pass :- %helm-pass

View File

@ -11,7 +11,7 @@
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide =? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
=/ cas r.bec :: use case from beak =/ cas r.bec :: use case from beak
=/ pax /(scot %p our)/[desk]/(scot cas)/story =/ 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) =/ tale=story .^(story %cx pax)
=/ story-to-mime .^($-(story mime) %cf /(scot %p our)/[desk]/(scot cas)/story/mime) =/ story-to-mime .^($-(story mime) %cf /(scot %p our)/[desk]/(scot cas)/story/mime)
=/ tale-mime (story-to-mime tale) =/ tale-mime (story-to-mime tale)

View File

@ -13,7 +13,7 @@
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide =? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
=/ cas=case r.bec :: use case from beak =/ cas=case r.bec :: use case from beak
=/ pax /(scot %p our)/[desk]/(scot cas)/story =/ 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) =/ tale .^(story %cx pax)
=/ current-tako .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) =/ 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)) =/ current-yaki .^(yaki:clay %cs /(scot %p our)/[desk]/(scot cas)/yaki/(scot %uv current-tako))