Converting snippet subrees to Lepiter pages.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-29 14:21:29 -05:00
parent 0b66b7513c
commit 2bcf67a132
5 changed files with 17 additions and 5 deletions

View File

@ -12,9 +12,9 @@ LeSnippet class >> fromMetaMarkdeep: div [
]
{ #category : #'*MiniDocs' }
LeSnippet >> moveTo: pageName [
LeSnippet >> moveToPageTitled: pageName [
| db origin destination thisSnippet |
thisSnippet := self snippetModel.
thisSnippet := self.
db := self page database.
destination := db pageNamed: pageName.
origin := db pageNamed: thisSnippet page title.

View File

@ -1,7 +1,7 @@
Extension { #name : #LeTextCoderSnippetElement }
{ #category : #'*MiniDocs' }
LeTextCoderSnippetElement >> moveTo: pageName [
LeTextCoderSnippetElement >> moveToPageTitled: pageName [
| db origin destination |
db := self page database.
destination := db pageNamed: pageName.

View File

@ -1,5 +1,17 @@
Extension { #name : #LeTextSnippet }
{ #category : #'*MiniDocs' }
LeTextSnippet >> asLePage [
| page |
page := LePage new
initializeTitle: self contentAsString.
self database addPage: page.
self childrenDo: [:child |
child moveToPageTitled: page title
].
^ page.
]
{ #category : #'*MiniDocs' }
LeTextSnippet >> contentFrom: markdeepDiv [

View File

@ -65,7 +65,7 @@ MiniDocs class >> installYamlToJson [
command: 'nim';
arguments: {'c'. self yamlToJsonSourceCode fullName};
runAndWaitOnExitDo: [ :process :outString |
(self yamlToJsonSourceCode parent / self yamlToJsonSourceCode basenameWithoutExtension) moveTo: MiniDocs appFolder asFileReference.
(self yamlToJsonSourceCode parent / self yamlToJsonSourceCode basenameWithoutExtension) moveToPageTitled: MiniDocs appFolder asFileReference.
^ MiniDocs appFolder ]
]

View File

@ -43,7 +43,7 @@ NanoID class >> install [
command: 'nim';
arguments: {'c'. self scriptSourceCode fullName};
runAndWaitOnExitDo: [ :process :outString |
(self scriptSourceCode parent / (self scriptSourceCode) basenameWithoutExtension) moveTo: MiniDocs appFolder asFileReference.
(self scriptSourceCode parent / (self scriptSourceCode) basenameWithoutExtension) moveToPageTitled: MiniDocs appFolder asFileReference.
^ MiniDocs appFolder ]
]