Fixing page and snippets create-edit time and uid parsing for markdeep lepiter format.
This commit is contained in:
parent
739c7298f1
commit
d35eedd172
@ -16,9 +16,10 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
|
|||||||
remoteMetadata := Markdeep new metadataFromXML: markdeepDocTree.
|
remoteMetadata := Markdeep new metadataFromXML: markdeepDocTree.
|
||||||
page := LePage new
|
page := LePage new
|
||||||
title: (remoteMetadata at: 'title');
|
title: (remoteMetadata at: 'title');
|
||||||
basicUid: (remoteMetadata at: 'id');
|
basicUid: (UUID fromString36: (remoteMetadata at: 'id'));
|
||||||
createTime: (remoteMetadata at: 'created');
|
createTime: (LeTime new time: ((remoteMetadata at: 'created') asDateAndTime));
|
||||||
editTime: ("ZTimestamp fromString:" (remoteMetadata at: 'modified'));
|
editTime: (LeTime new time: ((remoteMetadata at: 'modified') asDateAndTime));
|
||||||
|
latestEditTime: (LeTime new time: ((remoteMetadata at: 'modified') asDateAndTime));
|
||||||
createEmail: (remoteMetadata at: 'creator');
|
createEmail: (remoteMetadata at: 'creator');
|
||||||
editEmail: (remoteMetadata at: 'modifier').
|
editEmail: (remoteMetadata at: 'modifier').
|
||||||
snippets do: [ :snippet | page addSnippet: snippet ].
|
snippets do: [ :snippet | page addSnippet: snippet ].
|
||||||
|
@ -120,6 +120,13 @@ LePage >> htmlFileName [
|
|||||||
^ self exportedFileName, '.html'
|
^ self exportedFileName, '.html'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePage >> latestEditTime: aLeTime [
|
||||||
|
"Used for adding a LePage to database from a shared markdeep LePage version."
|
||||||
|
|
||||||
|
latestEditTime := aLeTime
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePage >> markdeepFileName [
|
LePage >> markdeepFileName [
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@ LePharoSnippet >> contentFrom: markdeepDiv [
|
|||||||
sanitizedStringText := markdeepDiv contentString lines reject: [ :line | line beginsWith: '~~~' ].
|
sanitizedStringText := markdeepDiv contentString lines reject: [ :line | line beginsWith: '~~~' ].
|
||||||
sanitizedStringText := "(Character cr asString)" '' join: sanitizedStringText.
|
sanitizedStringText := "(Character cr asString)" '' join: sanitizedStringText.
|
||||||
self code: sanitizedStringText;
|
self code: sanitizedStringText;
|
||||||
uid: (metadata at: 'id');
|
uid: (LeUID new uidString: (metadata at: 'id'));
|
||||||
parent: (metadata at: 'parent');
|
parent: (metadata at: 'parent');
|
||||||
createTime: (metadata at: 'created');
|
createTime: (LeTime new time: ((metadata at: 'created')asDateAndTime));
|
||||||
editTime: (metadata at: 'modified');
|
editTime: (LeTime new time: ((metadata at: 'modified') asDateAndTime));
|
||||||
editEmail: (metadata at: 'modifier');
|
editEmail: (metadata at: 'modifier');
|
||||||
createEmail: (metadata at: 'creator').
|
createEmail: (metadata at: 'creator')
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
|
@ -9,10 +9,10 @@ LeTextSnippet >> contentFrom: markdeepDiv [
|
|||||||
sanitizedStringText := sanitizedStringText allButFirst.
|
sanitizedStringText := sanitizedStringText allButFirst.
|
||||||
sanitizedStringText := sanitizedStringText allButLast.
|
sanitizedStringText := sanitizedStringText allButLast.
|
||||||
self string: sanitizedStringText;
|
self string: sanitizedStringText;
|
||||||
uid: (metadata at: 'id');
|
uid: (LeUID new uidString: (metadata at: 'id'));
|
||||||
parent: (metadata at: 'parent');
|
parent: (metadata at: 'parent');
|
||||||
createTime: (metadata at: 'created');
|
createTime: (LeTime new time: ((metadata at: 'created')asDateAndTime));
|
||||||
editTime: (metadata at: 'modified');
|
editTime: (LeTime new time: ((metadata at: 'modified') asDateAndTime));
|
||||||
editEmail: (metadata at: 'modifier');
|
editEmail: (metadata at: 'modifier');
|
||||||
createEmail: (metadata at: 'creator')
|
createEmail: (metadata at: 'creator')
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user