Importing Markdeep page metadata.
This commit is contained in:
parent
217755bfd2
commit
21ee43c9df
@ -1,23 +1,27 @@
|
|||||||
Extension { #name : #LeDatabase }
|
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' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeDatabase >> addPageFromMarkdeepUrl: aString [
|
LeDatabase >> addPageFromMarkdeepUrl: aString [
|
||||||
|
|
||||||
| page |
|
| page |
|
||||||
page := self detectLocalPageForRemote: aString.
|
page := self detectLocalPageForRemote: aString.
|
||||||
page ifNotNil: [ :arg | ^ self importErrorMessage: page ].
|
page ifNotNil: [ :arg | ^ self importErrorMessage: page ].
|
||||||
^ self addPageFromString: (self docTreeForLink: aString)
|
^ self addPageFromMarkdeep: (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 }
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
|
Loading…
Reference in New Issue
Block a user