Improving data importation in LePages.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-03-01 09:15:05 -05:00
parent 9aaf160fa4
commit 1b050e1d07
2 changed files with 4 additions and 12 deletions

View File

@ -5,7 +5,8 @@ LeDatabase >> addPageFromMarkdeepUrl: aString [
| page |
page := self detectLocalPageForRemote: aString.
page ifNotNil: [ :arg | ^ self importErrorMessage: page ]
page ifNotNil: [ :arg | ^ self importErrorMessage: page ].
self addPage: page.
]
{ #category : #'*Grafoscopio-Utils-Core' }

View File

@ -53,8 +53,8 @@ LePage >> fromMarkdeepUrl: aString [
self
basicUid: (pageMetadata at: 'id');
title: (pageMetadata at: 'title');
createTime: (pageMetadata at: 'created');
editTime: (pageMetadata at: 'modified');
createTime: (pageMetadata at: 'created') asDateAndTime;
editTime: (pageMetadata at: 'modified') asDateAndTime;
createEmail: (pageMetadata at: 'creator');
editEmail: (pageMetadata at: 'modifier');
optionAt: 'metadata' put: pageMetadata.
@ -69,12 +69,6 @@ LePage >> markdeepFileName [
^ sanitized, '--',(self uidString copyFrom: 1 to: 5), '.md.html'.
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> markdeepTemporalFile [
^ FileLocator temp / self markdeepFileName.
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> metadata [
@ -103,11 +97,8 @@ LePage >> options [
LePage >> populateChildrenFrom: docTreeDivs [
docTreeDivs doWithIndex: [:div :i | | snippetTemp parent "surrogate" |
snippetTemp := LeSnippet fromMetaMarkdeep:div.
"self children
addSnippet: snippet beforeIndex: i."
parent := self detectParentSnippetWithUid: (snippetTemp metadata at: 'parent').
parent snippetBuilder snippet: snippetTemp; add.
"parent := self snippetBuilder snippet: surrogate."
]
]