From 4bb79f6de0e7b19270e486ee0d2aae88521ad162 Mon Sep 17 00:00:00 2001 From: Offray Date: Sun, 24 Dec 2023 08:08:37 -0500 Subject: [PATCH] Moving metadata image handling to MiniDocs. --- .../LePictureSnippet.extension.st | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/repository/Grafoscopio-Utils/LePictureSnippet.extension.st b/repository/Grafoscopio-Utils/LePictureSnippet.extension.st index 6e5174a..07c4bba 100644 --- a/repository/Grafoscopio-Utils/LePictureSnippet.extension.st +++ b/repository/Grafoscopio-Utils/LePictureSnippet.extension.st @@ -13,36 +13,3 @@ LePictureSnippet >> centeredFigure [ ' ] - -{ #category : #'*Grafoscopio-Utils-Core' } -LePictureSnippet >> contentFrom: markdeepDiv [ - | caption width | - caption := markdeepDiv contentString. - width := (markdeepDiv // 'img' @ 'width') stringValue. - self - optionAt: 'caption' put: caption; - optionAt: 'width' put: width. - self urlString: (markdeepDiv // 'img' @ 'src') stringValue. -] - -{ #category : #'*Grafoscopio-Utils-Core' } -LePictureSnippet >> metadata [ - ^ self optionAt: 'metadata' ifAbsentPut: [ self metadataInit ] -] - -{ #category : #'*Grafoscopio-Utils-Core' } -LePictureSnippet >> metadataInit [ - | surrogate | - self parent - ifNil: [ surrogate := nil] - ifNotNil: [ surrogate := self parent uidString ]. - ^ OrderedDictionary new - at: 'id' put: self uidString; - at: 'parent' put: surrogate; - at: 'url' put: self contentAsString; - at: 'created' put: self createTime asString; - at: 'modified' put: self latestEditTime asString; - at: 'creator' put: self createEmail asString; - at: 'modifier' put: self editEmail asString; - yourself -]