Recovering metadata from children for updating notebook metadata.
This commit is contained in:
parent
bf0ea4b46d
commit
53910fa840
@ -26,9 +26,9 @@ LePage >> asMarkdeep [
|
|||||||
markdeep := Markdeep new
|
markdeep := Markdeep new
|
||||||
title: self title;
|
title: self title;
|
||||||
body: bodyStream contents;
|
body: bodyStream contents;
|
||||||
|
metadata: self metadata;
|
||||||
file: self storage / self markdeepFileName;
|
file: self storage / self markdeepFileName;
|
||||||
navTop: self navTop.
|
navTop: self navTop.
|
||||||
"self exportMetadataToHead: markdeep."
|
|
||||||
self metadata
|
self metadata
|
||||||
at: 'authors'
|
at: 'authors'
|
||||||
ifPresent: [ :author | markdeep metadata at: 'authors' put: author ].
|
ifPresent: [ :author | markdeep metadata at: 'authors' put: author ].
|
||||||
@ -205,6 +205,19 @@ LePage >> navTop [
|
|||||||
ifTrue: [ ^ topNavFile contents ]
|
ifTrue: [ ^ topNavFile contents ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePage >> olderChild [
|
||||||
|
"I provide the last edited child node.
|
||||||
|
I'm useful to recalculate the age of a notebook."
|
||||||
|
| response|
|
||||||
|
response := self preorderTraversal first.
|
||||||
|
self preorderTraversal do: [:current |
|
||||||
|
current editTime >= response editTime
|
||||||
|
ifTrue: [ response := current ]
|
||||||
|
].
|
||||||
|
^ response
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePage >> options [
|
LePage >> options [
|
||||||
^ options
|
^ options
|
||||||
@ -304,3 +317,16 @@ LePage >> uiRefreshWebPreviewButtonFor: anAction [
|
|||||||
"TODO: If Chrome/Chromium are not installed, I should execute:"
|
"TODO: If Chrome/Chromium are not installed, I should execute:"
|
||||||
"WebBrowser openOn: self page localHostAddress" ]
|
"WebBrowser openOn: self page localHostAddress" ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePage >> youngerChild [
|
||||||
|
"I provide the first create child node.
|
||||||
|
I'm useful to recalculate the age of a notebook."
|
||||||
|
| response|
|
||||||
|
response := self preorderTraversal first.
|
||||||
|
self preorderTraversal do: [:current |
|
||||||
|
current createTime <= response createTime
|
||||||
|
ifTrue: [ response := current ]
|
||||||
|
].
|
||||||
|
^ response
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user