Importing Markdeep page metadata.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-09-29 08:20:56 -05:00
parent 217755bfd2
commit 21ee43c9df

View File

@ -1,23 +1,27 @@
Extension { #name : #LeDatabase }
{ #category : #'*MiniDocs' }
LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
| remoteMetadata page |
remoteMetadata := Markdeep new metadataFromXML: markdeepDocTree.
page := LePage new
title: (remoteMetadata at: 'title');
basicUid: (remoteMetadata at: 'id');
createTime: (remoteMetadata at: 'created');
editTime: ("ZTimestamp fromString:" (remoteMetadata at: 'modified'));
createEmail: (remoteMetadata at: 'creator');
editEmail: (remoteMetadata at: 'modifier').
^ {markdeepDocTree . page }
]
{ #category : #'*MiniDocs' }
LeDatabase >> addPageFromMarkdeepUrl: aString [
| page |
page := self detectLocalPageForRemote: aString.
page ifNotNil: [ :arg | ^ self importErrorMessage: page ].
^ self addPageFromString: (self docTreeForLink: aString)
]
{ #category : #'*MiniDocs' }
LeDatabase >> addPageFromString: markdeepDocTree [
| remoteMetadata page |
remoteMetadata := Markdeep new metadataFromXML: markdeepDocTree.
page := LePage new
title: (remoteMetadata at: 'title');
basicUid: (remoteMetadata at: 'id').
^ {markdeepDocTree . page . remoteMetadata }
^ self addPageFromMarkdeep: (self docTreeForLink: aString)
]
{ #category : #'*MiniDocs' }