Improving metadata on images.
This commit is contained in:
parent
cc99feebac
commit
486773af63
@ -25,6 +25,17 @@ LePictureSnippet >> asMarkdeep [
|
|||||||
^ output contents
|
^ output contents
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
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 : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePictureSnippet >> fromMarkdeep: markdeepDiv [
|
LePictureSnippet >> fromMarkdeep: markdeepDiv [
|
||||||
^ markdeepDiv asSnippetDictionary asLepiterSnippet
|
^ markdeepDiv asSnippetDictionary asLepiterSnippet
|
||||||
@ -45,6 +56,11 @@ LePictureSnippet >> fromString: aString [
|
|||||||
^ self
|
^ self
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePictureSnippet >> metadata [
|
||||||
|
^ self metadataInit
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePictureSnippet >> metadataDiv [
|
LePictureSnippet >> metadataDiv [
|
||||||
| output |
|
| output |
|
||||||
@ -58,6 +74,23 @@ LePictureSnippet >> metadataDiv [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
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 withoutXMLTagDelimiters;
|
||||||
|
at: 'modifier' put: self editEmail asString withoutXMLTagDelimiters;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePictureSnippet >> metadataUpdate [
|
LePictureSnippet >> metadataUpdate [
|
||||||
| surrogate |
|
| surrogate |
|
||||||
|
Loading…
Reference in New Issue
Block a user