diff --git a/src/MiniDocs/LeDatabase.extension.st b/src/MiniDocs/LeDatabase.extension.st index bfbd227..c159063 100644 --- a/src/MiniDocs/LeDatabase.extension.st +++ b/src/MiniDocs/LeDatabase.extension.st @@ -16,9 +16,10 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [ 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')); + basicUid: (UUID fromString36: (remoteMetadata at: 'id')); + createTime: (LeTime new time: ((remoteMetadata at: 'created') asDateAndTime)); + editTime: (LeTime new time: ((remoteMetadata at: 'modified') asDateAndTime)); + latestEditTime: (LeTime new time: ((remoteMetadata at: 'modified') asDateAndTime)); createEmail: (remoteMetadata at: 'creator'); editEmail: (remoteMetadata at: 'modifier'). snippets do: [ :snippet | page addSnippet: snippet ]. diff --git a/src/MiniDocs/LePage.extension.st b/src/MiniDocs/LePage.extension.st index 91c8536..b273357 100644 --- a/src/MiniDocs/LePage.extension.st +++ b/src/MiniDocs/LePage.extension.st @@ -120,6 +120,13 @@ LePage >> htmlFileName [ ^ 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' } LePage >> markdeepFileName [ diff --git a/src/MiniDocs/LePharoSnippet.extension.st b/src/MiniDocs/LePharoSnippet.extension.st index a29d858..90ddfac 100644 --- a/src/MiniDocs/LePharoSnippet.extension.st +++ b/src/MiniDocs/LePharoSnippet.extension.st @@ -16,12 +16,12 @@ LePharoSnippet >> contentFrom: markdeepDiv [ sanitizedStringText := markdeepDiv contentString lines reject: [ :line | line beginsWith: '~~~' ]. sanitizedStringText := "(Character cr asString)" '' join: sanitizedStringText. self code: sanitizedStringText; - uid: (metadata at: 'id'); + uid: (LeUID new uidString: (metadata at: 'id')); parent: (metadata at: 'parent'); - createTime: (metadata at: 'created'); - editTime: (metadata at: 'modified'); + createTime: (LeTime new time: ((metadata at: 'created')asDateAndTime)); + editTime: (LeTime new time: ((metadata at: 'modified') asDateAndTime)); editEmail: (metadata at: 'modifier'); - createEmail: (metadata at: 'creator'). + createEmail: (metadata at: 'creator') ] { #category : #'*MiniDocs' } diff --git a/src/MiniDocs/LeTextSnippet.extension.st b/src/MiniDocs/LeTextSnippet.extension.st index 7098cc2..589ed25 100644 --- a/src/MiniDocs/LeTextSnippet.extension.st +++ b/src/MiniDocs/LeTextSnippet.extension.st @@ -9,10 +9,10 @@ LeTextSnippet >> contentFrom: markdeepDiv [ sanitizedStringText := sanitizedStringText allButFirst. sanitizedStringText := sanitizedStringText allButLast. self string: sanitizedStringText; - uid: (metadata at: 'id'); + uid: (LeUID new uidString: (metadata at: 'id')); parent: (metadata at: 'parent'); - createTime: (metadata at: 'created'); - editTime: (metadata at: 'modified'); + createTime: (LeTime new time: ((metadata at: 'created')asDateAndTime)); + editTime: (LeTime new time: ((metadata at: 'modified') asDateAndTime)); editEmail: (metadata at: 'modifier'); createEmail: (metadata at: 'creator') ]